December 10, 2025
Warning: drama ahead
Deprecations via warnings don't work for Python libraries
Python’s warning drama: devs say “nobody reads them” while APIs vanish
TLDR: urllib3 removed two old methods after years of warnings, then restored them amid backlash. Commenters say warnings are invisible, breaking changes belong in big “major” releases, and you shouldn’t force rewrites for non-critical tweaks—proof that deprecations need louder signals and better versioning rules.
The internet’s favorite download-hog urllib3 quietly removed two old school methods—getheader and getheaders—after years of flashing DeprecationWarning signs, then scrambled to put them back when users screamed. The author’s takeaway? Warnings are ignored by default, so deprecation-by-warning is basically whispering into a hurricane. The crowd brought popcorn. One camp cheered, “Finally, someone admits warnings don’t work,” with theamk dropping the spicy truth: good developers bury warnings in automated tests, bad ones ignore them until it breaks. Another camp snapped, “If you could keep it working, why remove it at all?” superkuh asked, while hartator shrugged, “It’s not security or speed—why should anyone waste time changing?” The biggest drama: SemVer (semantic versioning) rage. traverseda roasted the project for dropping APIs in a minor release, joking they’d accept major version 400 if it meant no surprise breakage. The fix happened fast, but the trust hangover lingers. The community’s verdict swings between “warnings are useless”, “use majors for breaking changes,” and “don’t make people rewrite code for no real gain.” The memes? “Warning: user ignored this,” “Major release 400,” and a collective sigh of “Just… don’t break stuff.”
Key Points
- •urllib3 v2.6.0 removed APIs deprecated since 2022 and marked problematic since 2019.
- •DeprecationWarning was emitted for each use for over three years but did not prompt sufficient adoption of alternatives.
- •The removed methods (e.g., getheader, getheaders) had recommended replacements via the headers interface compatible across urllib3 1.x and 2.x.
- •User feedback indicated unexpected breakage in dependent libraries, leading to a hurried release that restored the removed APIs.
- •The maintainer concludes DeprecationWarning is ineffective for Python library deprecations and suggests alternatives, including custom warnings or SemVer with frequent major releases.