mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

MAINT, TST: no_deprecated_call modernization

Open tylerjereddy opened this issue 1 year ago • 1 comments
trafficstars

As detailed at https://github.com/MDAnalysis/mdanalysis/pull/4744#discussion_r1807582150, no_deprecated_call (an old MDA testing utility) now requires an explicit warning class specification to work--so it'll choke with warnings.warn("boo"), but succeed with warnings.warn("boo", UserWarning).

Should probably be fixed (and or/upstreamed to pytest or put in some pytest plugin perhaps).

It is still actively used in our suite, but only a little bit, and perhaps not enough to have tracked the increased complexity of the warnings system from Python 2->3.

tylerjereddy avatar Oct 20 '24 02:10 tylerjereddy

Good point on trade-offs here -- IMO since it is actively used in our test suite (and would love to use it in the scenario of #4744, although it probably will have to happen after 2.8.0), we should maintain it. Between the last change 7 years ago the only difference seems to be that the default behaviour seems to have changed, so IMO the maintennace cost isn't extreme. I opened #4747 to fix it.

lilyminium avatar Oct 20 '24 04:10 lilyminium