Hynek Schlawack
104487f803
Start new release cycle
2015-08-20 13:59:36 +02:00
Hynek Schlawack
5158b66af9
Prepare 15.1.0
2015-08-20 13:53:57 +02:00
Hynek Schlawack
3c426bb0a6
Credit Ying for her contribution
2015-08-20 13:47:32 +02:00
Hynek Schlawack
e245f3d3df
Fix multi-level inheritance
...
Fixes #24 .
2015-08-20 13:25:32 +02:00
Hynek Schlawack
09f347f07b
Fix copy-pasta error
2015-08-12 13:51:44 +02:00
Samuel A. Falvo II
708533239d
Recommended documentation changes
2015-07-26 11:29:54 +02:00
Samuel A. Falvo II
9bb7076e15
Link changelog to readthedocs
2015-07-26 11:29:54 +02:00
Samuel A. Falvo II
765a97466d
Review feedback
2015-07-26 11:29:54 +02:00
Samuel A. Falvo II
0abd302cb2
Support optional values through a new validator.
...
Unfortunately, I'm unable to run tests locally b/c of severe dependency
hell. I am unable to get tox, detox, python setup.py test, and other
means of running tests to work at all. So, since I'm blocked on a
project by the lack of optional validator support, I am going to close
my eyes, look away, and pull the trigger, and hope I hit the target.
If someone who has a working Python configuration can please be kind
enough to let me know if my changes fail any tests, I'd be very
appreciative.
Even better, I'd love to know why a stock Python distribution with
dependencies installed is incapable of running the tests for attrs.
However, this isn't the right forum to answer that question.
(This PR has the 17+ debugging commits cleaned up.)
2015-07-26 11:29:53 +02:00
Hynek Schlawack
093e73bcda
Fix typo
2015-04-26 16:25:56 +02:00
Hynek Schlawack
2bd4f9d056
Start 15.1.0 cycle
2015-04-15 18:01:10 -04:00
Hynek Schlawack
21d5dd792a
Release 15.0.0 final
2015-04-15 17:39:29 -04:00
Hynek Schlawack
27e2f4e5c0
Document how to extend attrs
2015-03-23 10:32:13 +01:00
Hynek Schlawack
d964845899
Make __attrs_attrs__ a tuple
...
Having a mutable and rather heavy data structure for something that is supposed
to be immutable doesn't seem to make sense.
2015-03-23 09:17:54 +01:00
Hynek Schlawack
1f5513e098
Shorten creed
2015-02-21 11:36:08 +01:00
Hynek Schlawack
2a91800150
Add include and exclude filter helpers
2015-02-20 16:34:21 +01:00
Hynek Schlawack
fba942270b
Stay happy and positive
...
Closes #6
2015-02-20 13:29:47 +01:00
Hynek Schlawack
a185bbfdfb
Add option to disable validators globally
2015-02-20 11:30:46 +01:00
Hynek Schlawack
870a55aa37
Kill trailing whitespace
2015-02-20 10:27:27 +01:00
Hynek Schlawack
043f4d55d7
Take class namespaces into account in repr
...
Also add an explicit option for Python 2.
2015-02-20 09:47:08 +01:00
Hynek Schlawack
b88b85779e
Add smart support for sub-classing
2015-02-18 21:31:32 +01:00
Hynek Schlawack
03d779427f
Fix spelling of hipster clas
2015-02-10 17:31:21 +01:00
Hynek Schlawack
1abfb5dad8
Add an example of cross-attribute validation
2015-02-09 13:30:29 +01:00
Hynek Schlawack
08ff764de7
Pass instances into validators
...
Also construct the instance first and then run all validators on it.
This allows for cross-attribute validation.
2015-02-09 13:16:56 +01:00
Hynek Schlawack
445b6b2e00
Add these argument to attr.s
...
Useful for third party classes and when using properties.
Based on feedback by @econchick & @hawkowl
2015-02-08 16:31:16 +01:00
Hynek Schlawack
6a1a740c46
Add one more major advantage
2015-02-07 10:06:08 +01:00
Hynek Schlawack
4e81b7b5e2
Rename add_XXX to no_XXX
...
Assume you want everything by default and be consistent with the no_XXX
attributes on Attribute.
2015-02-07 09:15:59 +01:00
Hynek Schlawack
ddf0256527
Rename skip to filter and reverse logic
2015-02-06 14:56:02 +01:00
Hynek Schlawack
850915dc47
Add examples for asdict
2015-02-05 11:04:25 +01:00
Hynek Schlawack
2729edd04d
Fix markup in examples
2015-02-02 16:08:43 +01:00
Hynek Schlawack
c8c7a60389
Rename valid to validate
...
valid kind of implies a boolean return code.
2015-02-02 14:04:47 +01:00
Hynek Schlawack
2cab907370
Add attr.valid
2015-02-02 12:13:11 +01:00
Hynek Schlawack
f7597c795f
Clarify backward compatibility + polish API docs
2015-02-01 19:27:36 +01:00
Hynek Schlawack
82892487fb
Remove assignment validation again
...
Mainly because:
1. I don't want to encourage mutations.
2. It's impossible to protect the attributes from becoming invalid anyway so
this is a lot of complexity (and __setattr__ overwriting) but only little
benefit.
2015-01-31 18:01:31 +01:00
Hynek Schlawack
e7ebf4bf81
Allow single attributes to be excluded
2015-01-30 17:48:34 +01:00
Hynek Schlawack
943d686509
Validate assignments
2015-01-30 13:30:47 +01:00
Hynek Schlawack
5753281838
Add attrs.make_class
2015-01-30 08:57:33 +01:00
Hynek Schlawack
f61fb5d185
Eliminate factory field
...
Instead, have only one default field. If the default value is an instance of
attr.Factory, use it as a factory.
2015-01-29 23:10:56 +01:00
Hynek Schlawack
717dcdadca
Short default_value to default
2015-01-29 22:32:41 +01:00
Hynek Schlawack
9cb48a5814
Shorten default_factory to factory
2015-01-29 22:29:37 +01:00
Hynek Schlawack
16d9c464e3
Rename ls to fields
2015-01-29 21:55:25 +01:00
Hynek Schlawack
b79c3afec3
Rename to_dict to asdict
...
For stdlib compatability.
2015-01-29 21:50:07 +01:00
Hynek Schlawack
7aaab84091
Add assoc
2015-01-29 20:50:42 +01:00
Hynek Schlawack
8bb430cf18
Add basic support for zope.interface
2015-01-29 19:04:23 +01:00
Hynek Schlawack
2040ed5e48
Replace motto
2015-01-29 17:33:58 +01:00
Hynek Schlawack
3e45f0559e
Strip underscore for __init__
...
There is not such thing as private parameters.
2015-01-29 13:05:04 +01:00
Hynek Schlawack
0e2507d51d
Add an example of a custom validator
2015-01-29 12:26:25 +01:00
Hynek Schlawack
692e4613a0
Add instance_of validator
2015-01-29 12:20:17 +01:00
Hynek Schlawack
69a460d336
Add no-nonsense aliases for attr.s and attr.ib
...
I like the original ones but let's not give haters extra ammunition. :)
2015-01-29 10:17:08 +01:00
Hynek Schlawack
8bfa3a3c6f
Don't strip teaser
2015-01-29 09:13:16 +01:00