Merge pull request #29 from cournape/speedup_construction
ENH: query attributes through private API to speed up validate.
This commit is contained in:
commit
140c8c9288
|
@ -10,6 +10,7 @@ It’s the spiritual successor of `characteristic <https://characteristic.readth
|
|||
|
||||
The following folks helped forming ``attrs`` into what it is now:
|
||||
|
||||
- `David Cournapeau <https://github.com/cournape/>`_
|
||||
- `Glyph <https://github.com/glyph/>`_
|
||||
- `HawkOwl <https://github.com/hawkowl>`_
|
||||
- `Lynn Root <https://github.com/econchick>`_
|
||||
|
|
|
@ -390,7 +390,7 @@ def validate(inst):
|
|||
if _config._run_validators is False:
|
||||
return
|
||||
|
||||
for a in fields(inst.__class__):
|
||||
for a in inst.__class__.__attrs_attrs__:
|
||||
if a.validator is not None:
|
||||
a.validator(inst, a, getattr(inst, a.name))
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ The third digit is only for regressions.
|
|||
Changes:
|
||||
^^^^^^^^
|
||||
|
||||
None
|
||||
- speed up object creation when attribute validators are used `[28] <https://github.com/hynek/attrs/issues/28>`_
|
||||
|
||||
|
||||
15.1.0 (2015-08-20)
|
||||
|
|
Loading…
Reference in New Issue