diff --git a/AUTHORS.rst b/AUTHORS.rst index 599327bf..d0e44ca5 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -10,6 +10,7 @@ It’s the spiritual successor of `characteristic `_ - `Glyph `_ - `HawkOwl `_ - `Lynn Root `_ diff --git a/attr/_make.py b/attr/_make.py index a2532dc0..e4a9d066 100644 --- a/attr/_make.py +++ b/attr/_make.py @@ -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)) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5b889532..fe4af322 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -16,7 +16,7 @@ The third digit is only for regressions. Changes: ^^^^^^^^ -None +- speed up object creation when attribute validators are used `[28] `_ 15.1.0 (2015-08-20)