RFC: Introduce pending deprecation warning of test runner#17874
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 outdated.
This comment was marked as outdated.
| from astropy.utils.exceptions import AstropyDeprecationWarning, AstropyWarning | ||
|
|
||
| __all__ = ["TestRunner", "TestRunnerBase", "keyword"] | ||
| __all__ = ["TestRunner", "TestRunnerBase"] |
There was a problem hiding this comment.
keyword itself is a decorator, so it is weird to put a @deprecated decorator on a decorator. Not even sure why it is exposed in __all__. I think probably unintentional in the early days of astropy. Much easier to take it off public API. I don't think downstream should be using it on its own anyway.
There was a problem hiding this comment.
so it is weird to put a
@deprecateddecorator on a decorator
I disagree, there's technically nothing wrong with decorating a decorator. The fact that it feels weird (it does !) isn't sufficient reason to remove public API without a warning. We've had enough problems with removing stuff that was explicitly private, I don't fancy the idea of knowingly removing stuff that's explicitly public :/
There was a problem hiding this comment.
I still don't like decorator on a decorator. Let's wait for others and see. Thanks!
There was a problem hiding this comment.
hum, no other voice was raised, so I'm not sure how we can make a decision here. If it helps, I'm willing to let my suggestion ignored (assuming there are no known usage of keyword downstream), but we need to keep an eye out for sudden breakage and be ready to revert this bit to smooth out the transition.
| run_tests(pastebin="not_an_option") | ||
|
|
||
|
|
||
| def test_unicode_literal_conversion(): |
There was a problem hiding this comment.
I think this is a leftover from Python 2 days. Now this test makes no sense to me. Definitely unrelated to test runner.
|
linkcheck failure is unrelated. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
I think this is because asdf-astropy pulls in asdf, and unfortunately, asdf itself ships its own pytest plugin within the package (as opposed to separate plugin package): https://github.com/asdf-format/asdf/blob/main/pytest_asdf/plugin.py Even so, astropy/asdf-astropy#263 was merged 2 days ago. @bsipocz , does the error go away if you use a dev version of asdf-astropy? If not, I can dig more. Thanks all for your feedback! |
bsipocz
left a comment
There was a problem hiding this comment.
Indeed, uninstalling asdf resolves the problem, so I'm not blocking this any more.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
To me putting the deprecation in 7.1 is fine. |
|
OK. I will revert the API removal here. See #17883 |
6d843f5 to
558ddfe
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
DOC: Update docs to reflect pending deprecation TST: Update tests to catch AstropyPendingDeprecationWarning
558ddfe to
db6b023
Compare
neutrinoceros
left a comment
There was a problem hiding this comment.
Two remaining comments, one of which I'm willing to let go. The other one should be easy to implement (use pytest.deprecated_call). Otherwise, LGTM
with AstropyPendingDeprecationWarning. Update tests, runner docstring, docs.
3ab089c to
3b8bb2d
Compare
in astropy init
|
@mwcraig approved as well on Slack, so merging. Yeehaw. 🎆 |
Description
This pull request is to pave the way for formal deprecation of astropy test runner, as laid out in #16177 .
Also a follow-up of #15204 .xref #16208