Deprecations via warnings don’t work for Python libraries
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Python library maintainers cannot rely on DeprecationWarning to actually remove old APIs, because downstream users silently ignore warnings and breaking removals get reverted, as urllib3 just demonstrated.
A Python library called urllib3 removed some old, outdated functions in version 2.6.0, released on 5 December 2025. Those functions had been marked as 'deprecated', meaning users were warned they would go away, since April 2023. But other popular software, including the Kubernetes client, still relied on them and had not updated. Within days urllib3 had to put the old functions back, showing that relying on warnings alone to retire old code does not work.
urllib3, a widely used Python networking library, deleted two legacy methods in version 2.6.0 on 5 December 2025 after warning about them since April 2023. Major dependents such as kubernetes-client and fastly-py had never acted on those warnings, forcing an emergency rollback in version 2.6.1 on 8 December. The lesson for engineering leaders: deprecation warnings that are not surfaced in test suites or upgrade plans do not reduce risk, they hide it.
urllib3 2.6.0 (5 December 2025) removed HTTPResponse.getheaders() and HTTPResponse.getheader(name, default), deprecated since v2.0.0 in April 2023. Downstream breakage in kubernetes-client and fastly-py forced their restoration in 2.6.1 (8 December 2025). Seth Larson concludes DeprecationWarning does not work for Python library deprecations. James Bennett recommends running test suites with -Wonce::DeprecationWarning, 'warn once per Python process', so warnings surface without spam.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
urllib3 kubernetes-client fastly-py DeprecationWarning HTTPResponse.getheaders() Python
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.