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

Rate limit override by Vamp1reAchao · Pull Request #5330 · python-telegram-bot/python-telegram-bot · GitHub

Rate limit override - #5330

Open
Vamp1reAchao wants to merge 4 commits into
python-telegram-bot:masterfrom
Vamp1reAchao:rate-limit-override
Open

Rate limit override#5330
Vamp1reAchao wants to merge 4 commits into
python-telegram-bot:masterfrom
Vamp1reAchao:rate-limit-override

Conversation

Copy link
Copy Markdown

Fix AIORateLimiter handling of rate_limit_args=0.

Previously, passing 0 could be treated as a falsy value and fall back to the configured default retry limit. This change distinguishes an explicitly provided 0 from None, allowing callers to intentionally disable retries for a specific request while preserving the global default behavior when no override is provided.

Includes regression tests covering both explicit 0 and fallback-to-default behavior.

@@ -0,0 +1 @@
bugfixes = "Respect an explicit rate_limit_args=0 in AIORateLimiter"

Copy link
Copy Markdown
Member

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

The file is missing a few more attributes, can you look at the other .tomls and update this?

Copy link
Copy Markdown
Author

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

Done, updated the changelog entry and reverted the unrelated test change. Thanks!

harshil21 Aug 15, 2026
edited
Loading

Copy link
Copy Markdown
Member

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

Can you also fix the failing prek action? Don't worry about the other failing tests

Copy link
Copy Markdown
Author

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

Done, i fix it. Thanks!)

assert all(task.done() for task in non_chat_tasks.values())
assert all(task.done() for task in chat_tasks.values())
finally:
# cleanup

Copy link
Copy Markdown
Member

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

please revert this

harshil21 added contrib: safe for tests Add this label to contributor PR's to run tests. Must be re-added for every commit to run tests on. 🔌 bug pr description: bug labels Aug 15, 2026
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

🔌 bug pr description: bug contrib: safe for tests Add this label to contributor PR's to run tests. Must be re-added for every commit to run tests on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL