-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table's subclass break with serialization #7181
Comments
Actually the failure is because of #7147, and because we set |
(Ops, I kept adding a milestone by habit... I removed it. Ignore the confusing history there.) |
Here is a demonstration of the problem:
Here is a potential fix. Basically it just punts on making sure that the object the reader returns is a strict subclass of the output class, and instead just tries converting. This works for Table/QTable. Not sure if removing this test is a worry for other reader classes. @astrofrog ?
I'm supposed to be on holiday this week so if anyone else wants to pick this up that would be good. 😄 |
BTW see line below for the source of the QTable, and see #7190 for discussion related to why it needs to be QTable at that point: astropy/astropy/table/serialize.py Line 199 in 9878f93
|
Thanks for the quick answer and the patch @taldcroft , I can have a look to integrate this with a test if you want to enjoy your holidays 😉 |
With the serialization of astropy objects to FITS (#6912), I just noticed that it breaks the use of our
Table
subclass. When writing and reading back a FITS file with this subclass,io.registry.read
now fails because the reader return aQTable
, for which my class is not a subclass.I don't see a way to disable the serialization, or to not use it while reading. Any idea @taldcroft ?
The text was updated successfully, but these errors were encountered: