Menu

5 commands that list every deprecated call your code still makes (Python, TS, Go, Java, Kotlin)
📰

5 commands that list every deprecated call your code still makes (Python, TS, Go, Java, Kotlin)

DEV Community: java·Versyka·about 10 hours ago
#SMo8bXlW
#devtojava#devto#dev#deprecated#enter
Reading 0:00
15s threshold

Versyka

Posted on Nov 15

AI-assisted

Don't upgrade Python or Java until you run 5 commands. Each one below lists the deprecated calls your code still makes, and deprecated today usually means removed in the next major.

The problem with deprecations isn't that tools hide them. It's that they're warnings, and warnings scroll past in CI where nobody reads them. So the trick in every language is the same: make them errors once, on a branch, and read the list.

Python

pytest -W error::DeprecationWarning

Enter fullscreen mode

Exit fullscreen mode

Every DeprecationWarning raised while your tests run becomes a failure with a traceback pointing at your line.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.