sethmlarson.dev

Archives
Log in
Subscribe
December 8, 2025

Deprecations via warnings don’t work for Python libraries

Last week urllib3 v2.6.0 was released which contained removals for several APIs that we've known were problematic since 2019 and have been deprecated since 2022. The deprecations were marked in the documentation, changelog, and what I incorrectly believed would be the most meaningful signal to users: with a DeprecationWarning being emitted for each use for the API.

This API was emitting warnings for over 3 years in a top-3 Python package by downloads urging libraries and users to stop using the API and that was not enough. So what should we do instead?

Read more: https://sethmlarson.dev/deprecations-via-warnings-dont-work-for-python-libraries

Don't miss what's next. Subscribe to sethmlarson.dev:
← Newer Extracting Nintendo Switch “Play Activity” with OCR and Python Older → Mobile browsers see telephone numbers everywhere

Add a comment:

You're not signed in. Posting this comment will subscribe you to this newsletter with the email address you enter below.
Share this email:
Share on Hacker News Share on Reddit Share via email Share on Mastodon Share on Bluesky
sethmlarson.dev
Bluesky
Mastodon
Powered by Buttondown, the easiest way to start and grow your newsletter.