Why do libraries such as Requests or HTTPX not support this out of the box? It would be really useful to have automatic warning or sentry event after deprecation response.
I understand that this functionality can be easily added as a plugin, but not everyone is aware that such a thing even exists. With default support, it will be easier to upgrade to new API versions and keep stuff up to date.
I suggested exactly that (for the closely related Deprecation header) to Requests a few years ago, they feel it's the application's responsibility, discussion here: https://github.com/psf/requests/issues/5724
How would it behave? The standard as written doesn't suggest any appropriate client behaviour.
It explicitly doesn't have to mean deprecation, the standard says it could also be returned from any short-lived resource. There's no way to see if the header applies to the whole server or just the specific resource or even query parameters, and no way to deduplicate to ignore known warnings.
I'll argue that if these features are more widely known and respected, we wouldn't need to re-invent these kinds of elegant solutions with clunky and thick stacks, over and over again.
fogzen|6 months ago
“Sunset” is marketing speak.
JdeBP|6 months ago
dang|6 months ago
The Sunset HTTP Header Field - https://news.ycombinator.com/item?id=19926775 - May 2019 (82 comments)
aiven|6 months ago
I understand that this functionality can be easily added as a plugin, but not everyone is aware that such a thing even exists. With default support, it will be easier to upgrade to new API versions and keep stuff up to date.
pimterry|6 months ago
tveita|6 months ago
It explicitly doesn't have to mean deprecation, the standard says it could also be returned from any short-lived resource. There's no way to see if the header applies to the whole server or just the specific resource or even query parameters, and no way to deduplicate to ignore known warnings.
treve|6 months ago
It's nice when tooling builds this sort of stuff in, because it also encourages APIs to implement it.
bayindirh|6 months ago
marcosdumay|6 months ago