Repository navigation
Changes how rate-limited 429 responses describe the wait.
RateLimit'swis now the whole seconds before a bucket's next token, rounded down, as draft-ietf-httpapi-ratelimit-headers-12 defines it (the time within which the client can use no more thana). It's left out when that wait is under a second.- Only buckets with no tokens left carry
w. Buckets that still have tokens report onlya. In 0.2.0 they also sentwas the time to a full refill, which could be longer thanRetry-After. Retry-Afteris unchanged: the longest wait for a token among the empty buckets, rounded up.
If you use RateLimitPolicy or rate_limit_headers from usagerail.rate_limiter: reset_seconds is replaced by retry_after_seconds (the wait rounded up) and effective_window_seconds (rounded down, None under a second). Both are None for a bucket that still has tokens.