-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New rate limiting mechanism #3148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
fa93a2a
Very first start on a rate limit system
Bibo-Joshi 652f9e3
A bit more work for BaseRateLimiter
Bibo-Joshi f732459
Get a first proof of concept working
Bibo-Joshi f90c5e1
Merge branch 'master' into rate-limiter
Bibo-Joshi 103f53d
generics
Bibo-Joshi 79f9295
applicationbuilder
Bibo-Joshi cd0158f
slots and max-retries
Bibo-Joshi 5d66304
every group gets its own limiter & RetryAfter blocks all requests
Bibo-Joshi e980308
Fine tuning
Bibo-Joshi f41271b
add `aiolimiter` as optional dependency
Bibo-Joshi df72033
Merge branch 'master' into rate-limiter
Bibo-Joshi e409cf5
Bunch of documentation
Bibo-Joshi 1e48021
smaller fixes
Bibo-Joshi d509e3b
try fixing docs build
Bibo-Joshi a407af3
get even more started on tests
Bibo-Joshi b9eb962
pre-commit & docs
Bibo-Joshi c77d1be
Update shortcut signature tests
Bibo-Joshi 11caf7d
add two new tests
Bibo-Joshi 8f7140f
Merge branch 'master' into rate-limiter
Bibo-Joshi 8e8506b
More testing
Bibo-Joshi 4ca7ce3
More testing
Bibo-Joshi 1324c51
increase coverage
Bibo-Joshi 63486be
Small updates regarding the reqs
Bibo-Joshi fadaa31
try stabilizing tests
Bibo-Joshi 4f63760
try fixing worflows
Bibo-Joshi 06cf68a
be a bit more generous for macos
Bibo-Joshi 5e78181
Revert "be a bit more generous for macos"
Bibo-Joshi 4495536
just skip tests on macos
Bibo-Joshi 13ead3d
Apply suggestions from code review
Bibo-Joshi 2a7c98d
pre-commit
Bibo-Joshi 2f079df
get started on review
Bibo-Joshi 734ab3e
Add reqs-all.txt
Bibo-Joshi ca7fdeb
Rename flags for testing opt deps
Bibo-Joshi 4f3925a
handle integer chat_ids that are passed as string
Bibo-Joshi 3f35a8b
Document global nature of RetryAfter handling
Bibo-Joshi 1636783
add explanatory comments to a test
Bibo-Joshi 2e4b763
test for api_kwargs as well
Bibo-Joshi 6d06441
doc fix
Bibo-Joshi 6ea7a7a
try fixing a test
Bibo-Joshi aeb7dcf
Merge branch 'master' into rate-limiter
Bibo-Joshi 25b0800
deepsource
Bibo-Joshi 97fe539
try fixing ci
Bibo-Joshi 604380d
Merge branch 'master' into rate-limiter
Bibo-Joshi 242d2e0
Adapt to API 6.2
Bibo-Joshi 9dc6676
small fix
Bibo-Joshi a0797bb
deepsource
Bibo-Joshi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include LICENSE LICENSE.lesser Makefile requirements.txt README_RAW.rst telegram/py.typed | ||
include LICENSE LICENSE.lesser Makefile requirements.txt requirements-opts.txt README_RAW.rst telegram/py.typed |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
telegram.ext.AIORateLimiter | ||
============================ | ||
|
||
.. autoclass:: telegram.ext.AIORateLimiter | ||
:members: | ||
:show-inheritance: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
telegram.ext.BaseRateLimiter | ||
============================ | ||
|
||
.. autoclass:: telegram.ext.BaseRateLimiter | ||
:members: | ||
:show-inheritance: |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-r requirements.txt | ||
-r requirements-dev.txt | ||
-r requirements-opts.txt | ||
-r docs/requirements-docs.txt |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Format: | ||
# package_name==version # req-1, req-2, req-3!ext | ||
# `pip install ptb-raw[req-1/2]` will install `package_name` | ||
# `pip install ptb[req-1/2/3]` will also install `package_name` | ||
httpx[socks] # socks | ||
cryptography!=3.4,!=3.4.1,!=3.4.2,!=3.4.3,>=3.0 # passport | ||
aiolimiter~=1.0.0 # rate-limiter!ext |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.