Consider deprecating and then removing the io.ascii Column.dtype attribute
See original GitHub issueDescription
In #11892 there was discussion (and at one point code) to deprecate the io.ascii.core.Column.dtype
attribute, with a plan to remove it. This issue is created to continue that discussion separately from that PR.
I am not in favor of this because it removes the possibility of user-defined readers specifying the exact dtype
of columns without writing their own _convert_vals
method in a custom Outputter. Such readers might already exist in the wild.
Readers like CDS and Rdb currently use Column.type
to specify generic types such as float, int, str, but that mechanism does not allow fine-grained control like np.int8
. Before the overhaul of ECSV in v4.3 of astropy, the ECSV reader did use the Column.dtype
to do exactly that.
Io.ascii
has been out for about 10 years now and has always been advertised as an extensible reader (though dtype
came later, probably with ECSV). So we should not take this API change lightly as if it were just an internal change.
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
OK, if we have a test and @taldcroft has a use case (even if that’s not currently used), then we don’t remove it. It’s in there, it’s not broken and removing it won’t actually save us work right now. In contrast, it would be extra work right now - with the uncertain promise of saving work later.
So, I vote to close this and leave the attribute in.
OK, sounds like it is the path of at least adding a test!