Skip to content

Fix botched deprecation of class attribute in _ImageBaseHDU - #3982

Merged
embray merged 6 commits into
astropy:masterfrom
embray:fits/fix-botched-deprecation
Jul 21, 2015
Merged

embray merged 6 commits into
astropy:masterfrom
embray:fits/fix-botched-deprecation

Conversation

@embray

@embray embray commented Jul 20, 2015

Copy link
Copy Markdown
Member

Back in #3916 I deprecated a couple of old class attributes NumCode and ImgCode. However, it seems there is some old code that actually used these attributes (yay for deprecation!) as found by @mcara. However, I screwed up my attempt to deprecate those class attributes, by leaving them as methods. I think I meant to put a @property on top of them, but that still wouldn't have worked correctly since they are used at the class level as well.

Although this is a bug fix to v1.1.dev only, I've marked this Affects-release since it also includes a potentially useful new @classproperty decorator in order to fix this.

embray added 3 commits July 20, 2015 17:21
…logous to classmethod but for properties); unfortunately this version only allows read-only properties, as noted, but that's all I have need for at the moment anyhow)
…looking for code in Astropy that actually uses it. As it turns out there isn't any at the moment, but I found these stray imports that could be removed
… accidentally left as methods instead of working as class attributes as required by the original attributes)
@embray

embray commented Jul 20, 2015

Copy link
Copy Markdown
Member Author

Ah, of course this has Python 2 bugs... :(

embray added a commit that referenced this pull request Jul 21, 2015
Fix botched deprecation of class attribute in _ImageBaseHDU
@embray
embray merged commit ccf4dfe into astropy:master Jul 21, 2015
@embray
embray deleted the fits/fix-botched-deprecation branch July 21, 2015 16:27
embray added a commit to embray/astropy that referenced this pull request Jul 23, 2015
… lazy evaluation of attributes a la lazyproperty
embray added a commit to embray/astropy that referenced this pull request Jul 30, 2015
… lazy evaluation of attributes a la lazyproperty
dhomeier pushed a commit to dhomeier/astropy that referenced this pull request Aug 11, 2015
dhomeier pushed a commit to dhomeier/astropy that referenced this pull request Aug 11, 2015
… lazy evaluation of attributes a la lazyproperty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant