Open wtgee opened 1 year ago
To retain the functionality you are removing here, you need to change
https://github.com/astropy/astroplan/blob/cb9517e381a3e8338e8d182e5f130201139f7fc7/setup.cfg#L44
to turn warning into exceptions using
https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Now I'm confused why this wasn't working before. Currently passing PRs show deprecations as warnings rather than raising actual exceptions.
The pytest way is probably more sensitive than what astropy
was providing.
You should probably drop Python 3.7. It is picking up a very old astropy
(4.3.1).
You should probably drop Python 3.7. It is picking up a very old
astropy
(4.3.1).
@bmorris3 I was going to make the same recommendation. End of life for 3.7
is at the end of this month so seems like a good time to remove.
Edit: The test matrix in general could probably use some updating as it specifies older astropy versions specifically in addition to python 3.7. The tox.ini
and ci_tests.yml
also don't match up, although that's probably okay (?).
Hi @wtgee, sorry to begin reviewing this PR after making and merging #558, which I believe has the same effect as this PR. Shall we close this one?
Hey @bmorris3, this PR properly turns on the deprecations as exceptions via pytest, which replaces the functionality that was supposed to be working with enable_deprecations_as_exception
. #558 removes that but doesn't add the pytest filter.
It's up to you if that should be in the repo but adding it in shows a bunch of other deprecations that should probably be dealt with soon (hence the follow-up issues about python 3.7, etc), so it's arguably nice to retain that functionality.
Removes the function call and defaults to pytest just showing the warning at end of test run. Thanks @pllim for pointing out.
Edit: Astropy issue here https://github.com/astropy/astropy/issues/9718 and PR https://github.com/astropy/astropy/pull/14670
Closes #553
P.S. I feel like there is some kind of meta irony in us not noticing this was deprecated...