Commit Graph

270 Commits

Author SHA1 Message Date
Hynek Schlawack bc0b437e58
Rename convert to converter (#315) 2017-12-23 08:46:10 +01:00
Hynek Schlawack 051da6872a Wordsmith newsfragment 2017-12-19 08:41:06 +01:00
Kyle Altendorf 1addd3534d Make _CountingAttr empty metadata unique (#280)
* Make _CountingAttr empty metadata unique

Issue #278

* Correct st.none().map() to st.builds()

* Add 'real' and 'force coverage' tests for not None metadata

* Add changelog for pr 280

* Correct import order in tests/test_make.py

* Add back coverage force test

* Remove debug print from test/utils.py
2017-12-19 07:51:24 +01:00
Hynek Schlawack 5ed8c4a015
Fix MRO traversal with multiple inheritance (#304)
* Fix MRO traversal with multiple inheritance

* Add newsfragments
2017-12-13 15:33:44 +01:00
Yann Kaiser 9d441d70ab Fix __repr__ crashing when a member is uninitialized or deleted (#308) 2017-12-06 10:21:58 -08:00
Hynek Schlawack cd8890c744
Speed up __eq__ by generating code (#306)
* Speed up __eq__ by generating code

* Add newsfragment
2017-12-04 18:48:25 +01:00
Hynek Schlawack defa6b6f40 Fix and accelerate generated __hash__ methods (#296)
* Fix and accelerate generated __hash__ methods

We now create a method like we do for __init__ and hash also the class of the
instance.

* Add/fix news fragments

* Hash random numbers instead of the actual class

* Even simpler: let's hash the unique filename

Or rather it's hash, because hashing ints is very fast.
2017-11-30 10:16:11 +01:00
Hynek Schlawack f5b59a01f8
Handle inherited __annotations__ (#292)
* Handle inherited __annotations__

Fixes #291

* Add pr fragment
2017-11-14 06:27:50 +01:00
Hynek Schlawack a84a36d45f
Handle attrib redefs thru multiple inheritance (#287) 2017-11-11 07:09:17 +01:00
Hynek Schlawack 1e6627c9ad
Make ctypes optional (#286) 2017-11-10 17:23:53 +01:00
Hynek Schlawack aa097d62a1 Kill off merged news fragments 2017-11-08 18:44:09 +01:00
Hynek Schlawack 88aa1c897d
Add auto_attribs (#277)
Allow for attr.ib-less attribute definitions using class variable annotations.
2017-11-08 11:15:21 +01:00
Stanis Trendelenburg c1adf5cfc6 Fix pickling for instances of classes created using make_class() (#282) 2017-11-04 14:38:03 +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
Hynek Schlawack f47efca44e Some changelog adjustments 2017-10-03 10:45:00 +02:00
Hynek Schlawack 8b490b8586 Stop setting attributes on class bodies (#253)
* Stop setting attributes on class bodies

This behavior has been deprecated since 16.1 and can now be removed in
accordance with our backward-compatibility policy.

* We don't need iterkeys anymore
2017-10-02 12:14:37 +02:00
Chad Dombrova 566ada9848 Basic type support (#239)
* Add support for passing a type to attr.ib() and gathering the type from PEP526-style annotations.

* Address review notes.

* More review notes.

* A few more review changes.

* Quick final fix to the changelog.
2017-09-17 16:22:49 +02:00
Hynek Schlawack 4faf5f9c26 Allow subclasses to overwrite attributes (#229)
Simply filter out all attributes from super classes that are present in the
current class.

Fixes #221
2017-08-21 00:39:34 +02:00
Hynek Schlawack 5184ecac99 Obey own naming scheme 2017-08-20 08:11:12 +02:00
Hynek Schlawack 55ae1945b3 Move changelog to towncrier (#236) 2017-08-20 07:58:08 +02:00