Repository navigation
MNT: io.ascii deprecate and rename / remove arguments - #14914
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.
|
|
Do you think this will break a lot of downstream code? I see a lot of API changes but I cannot tell what is internal use only and what isn't. We might want to consider:
|
|
It doesn't hurt to mention in this in a few places and I'll do that. However, I am not very worried about a lot of code breakage. The I think that part of why this looks so impacting is that a lot of the tests were written prior to updating the interface (to use |
|
|
Yup, it reads a table using |
| assert any(warn.message.args[0].startswith(msg) for warn in warns) | ||
|
|
||
| check_warns(ascii.read, ["a b", "1 2"]) | ||
| check_warns(ascii.get_reader) |
There was a problem hiding this comment.
Should be add a check that it still reads the table though? This test only checks the warning message. It would pass if the warning is emitted, but the output is total garbage.
I don't think we need to repeat the entire test suite with the old keywords, but since they are only deprecated but are still supposed to work I would feel more comfortable knowing we have at least one test that checks that they still work. I'm worried that we'll break them in the next few weeks if we don't have a check.
I suggest to add a simple check for just one read and one write in one format here. Or maybe you did that I just missed it?
Co-authored-by: P. L. Lim <[email protected]>
89e1ef5 to
82288f6
Compare
|
@hamogu - sorry for the late update, but I just noticed this PR hanging out. I rebased, fixed some issues and addressed your review comment for additional tests. It looks like tests are passing though a few combinations are still running. I think we're ready to finally deprecate those ancient |
|
What is still deprecated and need to be removed in 7.0 or later? |
|
@pllim - If I understand the question, in the description there are 8 function kwargs that are now formally deprecated and they should all be removed in 7.0. |
|
@taldcroft , can you please open a follow up issue and list the 8 things slated for removal? Hard to tell from all the diff here. Thanks! |
|
Haha, calendar reminder is not necessary. Thanks for opening the issue! 😸 |
Description
This pull request is to formally deprecate a number of keyword arguments that have non-PEP8-compliant names and/or functionality that has been superceded by a new preferred API. In summary:
read():Readerwill be removed. Instead supply the equivalentformatargument.Inputterhas been renamed toinputter_cls.Outputterhas been renamed tooutputter_cls.get_reader():Readerhas been renamed toreader_cls.Inputterhas been renamed toinputter_cls.Outputterhas been renamed tooutputter_cls.write():Writerwill be removed. Instead supply the equivalentformatargument.get_writer():Writerhas been renamed towriter_cls.Fixes #8567