Deprecation Window Math: Who Pays for a Longer Notice Period?

Every deprecation has a window: the time between the first warning and the release that removes the old API. A short window is cheap for you and expensive for users who miss it. A long window spreads their upgrade work out but means you keep two code paths alive. This page turns that trade-off into rough arithmetic you can do with your own estimates.

The two sides of the ledger

Maintainer cost of keeping the old path is roughly:

keep_cost = months_open × (hours_per_month_on_shim + hours_per_month_on_related_issues)

The shim hours cover tests for both paths, the adapter code itself and the extra care when refactoring nearby. Issue hours cover questions from users who hit the warning and do not understand it.

User cost avoided by the longer window is harder to see but usually larger:

avoided_cost = users_who_would_miss_short_window × hours_of_unplanned_upgrade_each

Users who notice a warning in time upgrade during normal work. Users who discover the removal when a build breaks upgrade under pressure, often on a deadline, and some of them open issues or pin your old version indefinitely. The longer window does not remove their work; it moves it to a better moment.

A worked comparison (illustrative)

Every number below is an assumption for a hypothetical Package C, not a measurement. Replace them with your own.

Assumption3-month window12-month window
Maintainer hours per month on shim and issues22
Maintainer cost (hours)624
Dependent projects likely to miss the warning4010
Unplanned upgrade hours per missed project33
User cost of unplanned upgrades (hours)12030
Total hours across the ecosystem12654

Under these assumptions the longer window costs the maintainer 18 extra hours and saves users about 90. Whether that is worth it depends on whether you count user time at all, which is a values question rather than a math question. Many maintainers of widely used packages decide that they do, because the alternative shows up as their own issue tracker filling up.

Levers that change the numbers

Limits

This is a framing tool, not a forecast. It ignores security fixes, which may justify removing an unsafe API quickly regardless of cost, and it treats every user hour as equal. Use it to make the trade-off explicit in a design discussion. The deprecation policy options paper and the comparison of removing versus deprecating cover the policy side.