This would be really nice <https://www.reddit.com/...
# random
e
Oh, would be cool if mypy detected API deprecations. This is an unfortunate fact:
Users may run their test suite with warnings disabled for practical reasons, or deprecations may be triggered in code paths that are not covered by tests.
a
Yeah, understood. I think where this really helps is in the SDK, and in that case we do somewhat have the ability to force 'standard' tests to pass through specific code paths.
I've always thought the 'print deprecation warning log messages' a sub-ideal solution, since those are by their very nature going to be seen by users and very likely not seen by the developer. But a failure during test or "compile" time and silence (or a warning) for users is probably the best.
m
I would love to see this PEP realized. This is something I take for granted in Java.
w
I've always thought the 'print deprecation warning log messages' a sub-ideal solution, since those are by their very nature going to be seen by users and very likely not seen by the developer.
@aaronsteers @edgar_ramirez_mondragon Thoughts on making Pytest for Meltano fail if any warnings are emitted to prevent us from ignoring them? Meltano's test suite was passing with no warnings, but because checking them was a manual step someone merged a PR without checking them, and now several emit warnings: https://github.com/meltano/meltano/issues/6973. We could update the proposed resolution for that issue to include making Pytest fail if any warnings are emitted.
e
@Will Da Silva (Arch) Yeah, I’m up for that, also in the SDK. The bigger issue is probably with our packages with public APIs (i.e. the SDK, EDK). The templates should probably include a
filterwarnings
in the pytest settings, to fail on deprecation warnings (probably specific to the the library, we may not want them to fail on any deprecation warning). Relevant for: https://github.com/meltano/sdk/pull/1294