When astropy.io.fits is constructing a Header and encounters a card that is defined but has no assigned value, it sets the value of that key to an astropy.io.fits.card.Undefined object. These objects pass in string form into *HEADER MultiDicts constructed from those Headers, and as Undefined objects into pdr.Metadata objects constructed while reading FITS files in "primary" mode. Undefined objects inherit object.__str__ and object.__repr__ and therefore do not have stable string representations. This means that ix cannot generate stable hashes for MultiDicts generated from the headers of FITS files of this type. Also, while basically harmless in normal operation, presenting users with objects of unusual library-specific types is not consistent with pdr's general idiom. We can address these issues by simply replacing Undefined objects with None.
When
astropy.io.fits
is constructing aHeader
and encounters a card that is defined but has no assigned value, it sets the value of that key to anastropy.io.fits.card.Undefined
object. These objects pass in string form into *HEADERMultiDict
s constructed from thoseHeader
s, and asUndefined
objects intopdr.Metadata
objects constructed while reading FITS files in "primary" mode.Undefined
objects inheritobject.__str__
andobject.__repr__
and therefore do not have stable string representations. This means thatix
cannot generate stable hashes forMultiDict
s generated from the headers of FITS files of this type. Also, while basically harmless in normal operation, presenting users with objects of unusual library-specific types is not consistent withpdr
's general idiom. We can address these issues by simply replacingUndefined
objects withNone
.