Skip to content

Fix post init hook not being called if validators are disabled (#129)#130

Merged
hynek merged 6 commits intopython-attrs:masterfrom
p-himik:master
Jan 6, 2017
Merged

Fix post init hook not being called if validators are disabled (#129)#130
hynek merged 6 commits intopython-attrs:masterfrom
p-himik:master

Conversation

@p-himik
Copy link
Copy Markdown
Contributor

@p-himik p-himik commented Jan 5, 2017

No description provided.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 5, 2017

Current coverage is 100% (diff: 100%)

Merging #130 into master will not change coverage

@@           master   #130   diff @@
====================================
  Files           8      8          
  Lines         505    504     -1   
  Methods         0      0          
  Messages        0      0          
  Branches      110    110          
====================================
- Hits          505    504     -1   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update cfb7a31...3925d63

@hynek
Copy link
Copy Markdown
Member

hynek commented Jan 5, 2017

Well that sure is an oops! :) Could you add tests and a changelog entry please?

Copy link
Copy Markdown
Member

@hynek hynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, thank you!

Comment thread src/attr/_make.py Outdated
a.name))
names_for_globals[val_name] = a.validator
names_for_globals[attr_name] = a
lines.append("if _config._run_validators:")

This comment was marked as spam.

Comment thread CHANGELOG.rst Outdated

- Raise ``FrozenInstanceError`` when trying to delete an attribute from a frozen class.
`#118 <https://github.com/hynek/attrs/pull/118>`_
- Fix __attrs_post_init__ not being run when the validation is disabled.

This comment was marked as spam.

@hynek hynek modified the milestone: 17.0 Jan 6, 2017
@hynek hynek merged commit 1481227 into python-attrs:master Jan 6, 2017
@hynek
Copy link
Copy Markdown
Member

hynek commented Jan 6, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants