Repository navigation
Table.read for Path objects and FITS files - #4405
Conversation
|
Code attached. cc: @embray @astrofrog |
|
Note that this only applies to the I/O registry and not the underlying FITS layer. |
|
Looks good! |
|
+1 (but needs a changelog entry) |
Allow pathlib.Path objects for registry read / write file names
|
Please don't merge PRs (especially for bug fixes!) without applying a milestone. |
|
@embray - sorry (again, sigh). But in fact I think the current classification of this PR should be Enhancement, not Bug, and that the milestone should be 1.2. Certainly should have discussed this before merge. Can I blame the reviewers?? 😄 It does not fix the underlying issue in |
|
I'm not super worried about how it's "classified". Just important to add the milestone so that changes can get sorted correctly into their targeted releases. |
|
@embray - ok I've changed this to an enhancement for 1.2.0. This is another lesson for me to be more cautious about converting an issue to a PR. In this case a new PR would have worked out better. |
|
I think it should still be where it already was. Missing support for pathlib can be considered a bug. |
|
Besides if you're going to change the milestone you would also have to move the changelog entry. I think it's fine as it is. I was just nagging about the milestone for the purpose of reminding. |
Allow pathlib.Path objects for registry read / write file names
I got this error message (see also #4165):
The reason is that I used a
pathlib.Pathobject, which doesn't work for filenames with Astropy.I don't know if it would be desirable to make Astropy table and fits work with pathlib.Path objects in addition to filename strings.
But I noticed this, which maybe could be considered a bug?
The
overwrite=Trueargument toTable.writeis not recognised in this case!?Can this behaviour or the error messages when
pathlib.Pathobjects are passed be improved?