FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Preserve throttle tags when updating the token bucket by xiehuanyi · Pull Request #381 · grantjenks/python-diskcache · GitHub

Repository navigation

Preserve throttle tags when updating the token bucket - #381

Open
xiehuanyi wants to merge 1 commit into
grantjenks:masterfrom
xiehuanyi:fix/throttle-preserve-tag-20261008
Open

xiehuanyi wants to merge 1 commit into
grantjenks:masterfrom
xiehuanyi:fix/throttle-preserve-tag-20261008

Conversation

Copy link
Copy Markdown

A throttled function loses its cache entry's tag on its first call. throttle(..., tag='limiters') initially stores that tag, but both token-bucket update paths overwrite the entry without it, so a subsequent cache.evict('limiters') leaves the limiter behind.

Keep the configured tag when updating the token bucket. The regression test covers consuming existing tokens and replenishing a full bucket, then confirms tag-based eviction still removes the entry.

Validation on Python 3.11.14: both new cases fail on unmodified master; the full test suite passes all 251 tests after the fix. Blue, Flake8, isort, Mypy, and Pylint 2.17.7 pass. Current Pylint reports pre-existing configuration/positional-argument diagnostics, so local lint validation used the compatible 2.x version. Other interpreter versions were not run locally.

Developed, reviewed, and tested with AI assistance.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL