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
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 |
astropy/io/ascii/tests/test_read.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <2090236+pllim@users.noreply.github.com>
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long live asciitable
!
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()
:Reader
will be removed. Instead supply the equivalentformat
argument.Inputter
has been renamed toinputter_cls
.Outputter
has been renamed tooutputter_cls
.get_reader()
:Reader
has been renamed toreader_cls
.Inputter
has been renamed toinputter_cls
.Outputter
has been renamed tooutputter_cls
.write()
:Writer
will be removed. Instead supply the equivalentformat
argument.get_writer()
:Writer
has been renamed towriter_cls
.Fixes #8567