Repository navigation
Conversation
This is not a long-term solution, since that will involve code changes, but for now just hide these deprecation warnings. These warnings could have been made to only be checked for with AstroPy >= 1.3, but I did not feel it was worthwhile adding this level of complication.
|
I claim that the test failures are nothing to do with the astropy warning change, but it's not clear to me what is causing them - e.g. see https://travis-ci.org/sherpa/sherpa/jobs/188548392#L2114 Is there some other change somewhere that is causing this (perhaps in py.test and family; possibly related to #240) |
|
There is some discussion in astropy/astropy#5644 of backing out this deprecation in astropy 1.3.1. It is causing more pain than expected. |
|
Ta for the info, @taldcroft . Unless we "blacklist" astropy 1.3.0, I think we will still need to deal with the warning messages [*]. [*] which is not hard; the more-annoying part is having to deal with a change in the API, but that wasn't part of this PR anyway [] |
|
Aha. Some of the tests in
I think I prefer 2, as 1 is actually a change in behavior, from ensuring there's no warnings to just ignoring any warnings. Are there any other options? |
Remove AstroPy deprecation warnings from version 1.3.0 for the two tests, since they are not intended to check for this warning. There are also small changes to the test (moving some code out of the warning path since it's really only save_data that is being tested here), as well as pep8 tweaks.
|
So I implemented option 2, which seems to work. |
|
If this looks good I'll rebase it so there's only one commit. |
|
An alternative to this would be to make the travis builds skip this version of AstroPy (1.3.0), but that only helps the Travis build. Users would still hit the problem. |
|
@DougBurke the result is paradoxical. The test was added in #116 to make sure #27 was fixed, and the bug was indeed that some Would you agree with this plan? |
|
@olaurino - as I see it there are two approaches to the warning messages: a) ignore them and I don't think that there's always going to be a single approach that works. I am actually a bit concerned about the way we generally do a in our tests, as I think it could lead to not realizing we've used deprecated or problematic code, but I am not convinced there's a simple solution to this concern, and it is also larger in scope than this PR! Getting back to this PR: I think I would be happy in removing the explicit checks for warnings in the |
|
As far as your item a) goes, I agree that ignoring a warning should in most cases be temporary, and we should try and remove the offending code if possible. As you said, that goes beyond this PR, which is ignoring warnings anyway. If Tom hadn't mentioned there is a good chance the change is going to be reverted back in |
|
Closing this PR in favor of #330. |
This is not a long-term solution, since that will involve code changes,
but for now just hide these deprecation warnings.
These warnings could have been made to only be checked for with
AstroPy >= 1.3, but I did not feel it was worthwhile adding this
level of complication.