Skip to content

Rate limit override - #5330

Open
Vamp1reAchao wants to merge 1 commit into
python-telegram-bot:masterfrom
Vamp1reAchao:rate-limit-override
Open

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

Conversation

@Vamp1reAchao

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.

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

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.

please revert this

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