Skip to content

ENH: forbid delete attr from frozen class#118

Merged
hynek merged 2 commits intopython-attrs:masterfrom
tacaswell:enh_nodel_when_frozen
Dec 14, 2016
Merged

ENH: forbid delete attr from frozen class#118
hynek merged 2 commits intopython-attrs:masterfrom
tacaswell:enh_nodel_when_frozen

Conversation

@tacaswell
Copy link
Copy Markdown
Contributor

Raise FrozenInstanceError when trying to delete an attribute from
a frozen class.

On non-frozen classes del results in un-shadowing the attr.ib object which is a bit surprising.

Raise FrozenInstanceError when trying to delete an attribute from
a frozen class.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 30, 2016

Current coverage is 100% (diff: 100%)

Merging #118 into master will not change coverage

@@           master   #118   diff @@
====================================
  Files           8      8          
  Lines         502    505     +3   
  Methods         0      0          
  Messages        0      0          
  Branches      110    110          
====================================
+ Hits          502    505     +3   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update 6771640...3e512af

@hynek
Copy link
Copy Markdown
Member

hynek commented Dec 4, 2016

This makes sense. Would you please add a changelog entry?

@tacaswell
Copy link
Copy Markdown
Contributor Author

Sorry that took so long. Went for 'change' not 'API break'.

@hynek hynek merged commit 72743d2 into python-attrs:master Dec 14, 2016
@hynek
Copy link
Copy Markdown
Member

hynek commented Dec 14, 2016

Thanks! I’m fixed it myself but next time use semantic line feeds please. :)

@tacaswell tacaswell deleted the enh_nodel_when_frozen branch December 14, 2016 14:30
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