[AstroPy] patch for pywcs

Michael Droettboom mdroe@stsci....
Mon Oct 10 09:19:24 CDT 2011

Thanks for the report.  It looks good.  As Erik said, the pyfits 3.x 
compatibility change is already there, but I've gone ahead and put the 
"has_key"-related changes in the SVN repository.


On 10/10/2011 07:36 AM, Erik Bray wrote:
> Hi,
> I'm pretty sure Mike is still the pywcs maintainer, but as the pyfits
> maintainer I can say it looks good to me.  The 'fromstring' portion of
> your patch is already fixed in pywcs's trunk (it checks the pyfits
> version with pyfits.__version__ by the way).
> But the all the has_keys still need to be fixed.  That one's a bit
> surprising since I thought I grepped most of our code base for that and
> removed them, but I guess a few slipped through the cracks.
> Thanks!
> Erik
> On 10/08/2011 02:52 AM, Rene Breton wrote:
>> Hi,
>> I don't know if Michael Droettboom is still the maintainer of pywcs but
>> I have a patch to submit for the next release. There have been major
>> changes to pyfits 3.x compared to 2.x and hence pywcs fails to export to
>> header properly (pywcs.WCS.to_header). I have fixed the problem.
>> Currently, it requires a "try... except" because I haven't found an
>> elegant way to make it compatible with both 2.x and 3.x. When pywcs
>> moves to requiring pyfits>3.x then the exception clause could be removed.
>> At the same time, I've also remove the header.has_key and replaced them
>> for "key in header" as the header.has_key spits out a DeprecationWarning.
>> The patch is attached.
>> Cheers,
>> Rene
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy@scipy.org
>> http://mail.scipy.org/mailman/listinfo/astropy
> _______________________________________________
> AstroPy mailing list
> AstroPy@scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

More information about the AstroPy mailing list