astropy: Make it configurable to skip subset of deprecations being raised
Under python3.6 we see this issue that using unittest with pytest is raising tons of DeprecationWarnings (e.g. https://github.com/astropy/halotools/issues/718 & https://github.com/astropy/astroquery/pull/815)
It would be rather useful to have a configurable list for treat_deprecations_as_exceptions
that would skip deprecations being raised, similarly as it already happens for a few packages by default:
https://github.com/astropy/astropy/blob/master/astropy/tests/helper.py#L242
I’m adding a milestone, so if noone else picks this up I’ll try to do it myself for the next major release.
Also if this happens before, I’m considering this backporting to a bugfix, as this missing feature may be considered a bug (as the tests are failing in the affiliates).
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (25 by maintainers)
Backporting is easy, the question whether this can lay low under @eteq’s radar. But nevertheless it’s a super useful addition for affiliates to use straight away, thus I would consider it to backport.
Should we then threat it as a bugfix? 😉
Yes, but you somehow triggered that thought that this is due to the old bundled version. 😉
@pllim - Off-topic: You were right that this got fixed upstream. We only saw it as we were still using the astropy bundled pytest in both packages. After wwitching to use system pytest (pytest3) there are no deprecation warnings.
Well, we already silence a few e.g. scipy, in a rather blackbox like manner from the affiliates point of view. Having these listed as defaults in the
conftest.py
would make things a little bit clearer I think.For the
StopIteration
error, wouldn’t it be more proper to address the underlying problem?https://www.python.org/dev/peps/pep-0479/#writing-backwards-and-forwards-compatible-code