Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
This comment was marked as resolved.
This comment was marked as resolved.
No! You've corrected an issue I have not. 👏 I'll have a closer look and give a review today. |
jdavies-st
left a comment
There was a problem hiding this comment.
Thanks @pllim! This is a good start, and it actually addresses part of issue #20457 that my own attempt at a fix in #20469 does not - having check_token actually warn the user when they are going to write ill-formed (and thus probably not portable) XML VO table.
In my PR, I did not actually do anything about xmlutil.check_token() not returning an error or warning. This does. And that part is important.
That said, I think there are 3 issues here in this PR:
- I think
write_table_votable()is probably not the location to fix the invalid characters. It only gets called for `Table.write(format="votable"). A few cases slip through that do not pass through this function, as mentioned below. And those are in the docs as ways to do it. - It adds a lot of memory overhead (temporarily 2x) and slows down the write by a factor of ~2x.
- We may want to
warn_or_raisewithincheck_token(). It is used on read and write, and I think following the other patterns within that file, we want to default to be silent on read (user can't do anything about it) and warn on write (user can fixup before writing).
So I would drop the connect.py changes, but otherwise, this looks good.
but this will fail without follow-up patch so [ci skip] Co-authored-by: James Davies <[email protected]>
but need more code [ci skip] Co-authored-by: James Davies <[email protected]>
Co-authored-by: James Davies <[email protected]>
262f9ca to
1c6e7a5
Compare
|
@jdavies-st , I think I have addressed all your comments. Please re-review. Thanks! |
Description
This pull request is to fix small part of #20457 . Better not backport as this might break some use cases downstream, maybe.
AI Disclosure
If AI tools were used to develop this pull request, describe the tools including specific model and version, how they were used, and what content is AI generated. Otherwise enter "N/A".
N/A
Merge method