Somewhere between the CFITSIO version used by the stack (3.36) and the version I’ve been using personally (3.39),
fits_write_key (and other header-writing routines) started transforming all header keys (including
HIERARCH keys) to upper case. I just checked, and this is consistent with the FITS standard, which explicitly disallows lowercase for header keys.
It’s hard to argue with that change, but it means the strings we use no longer round-trip, and that causes at least one test in the stack to fail. I think the right thing to do is to make that test more permissive, but pushes me further along the track of believing we should consider giving up on FITS as a format we use internally to persist our own objects (we obviously will need to continue to support it as import/export, but round-tripping isn’t as important there); not being able to round-trip the keys in a dict to the most natural FITS version of a dict seems like a big problem.