limits 5.2.0__tar.gz → 5.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {limits-5.2.0 → limits-5.3.0}/HISTORY.rst +12 -0
- {limits-5.2.0 → limits-5.3.0}/PKG-INFO +1 -1
- {limits-5.2.0 → limits-5.3.0}/limits/_version.py +3 -3
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/memory.py +6 -6
- {limits-5.2.0 → limits-5.3.0}/limits.egg-info/PKG-INFO +1 -1
- {limits-5.2.0 → limits-5.3.0}/CLASSIFIERS +0 -0
- {limits-5.2.0 → limits-5.3.0}/CONTRIBUTIONS.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/LICENSE.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/MANIFEST.in +0 -0
- {limits-5.2.0 → limits-5.3.0}/README.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/Makefile +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/_static/custom.css +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/api.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/async.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/changelog.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/conf.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/custom-storage.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/ext/_static/benchmark-chart.css +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/ext/_static/js/benchmark-chart.js +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/ext/_static/js/benchmark-details.js +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/ext/_static/js/benchmark-loader.js +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/ext/_templates/git_info.js +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/ext/bench_chart.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/index.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/installation.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/performance.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/quickstart.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/storage.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/strategies.rst +0 -0
- {limits-5.2.0 → limits-5.3.0}/doc/source/theme_config.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/__init__.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/__init__.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/__init__.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/base.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/memcached/__init__.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/memcached/bridge.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/memcached/emcache.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/memcached/memcachio.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/mongodb.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/redis/__init__.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/redis/bridge.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/redis/coredis.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/redis/redispy.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/storage/redis/valkey.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/aio/strategies.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/errors.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/limits.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/py.typed +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/resources/redis/lua_scripts/acquire_moving_window.lua +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/resources/redis/lua_scripts/acquire_sliding_window.lua +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/resources/redis/lua_scripts/clear_keys.lua +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/resources/redis/lua_scripts/incr_expire.lua +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/resources/redis/lua_scripts/moving_window.lua +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/resources/redis/lua_scripts/sliding_window.lua +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/__init__.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/base.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/memcached.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/memory.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/mongodb.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/redis.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/redis_cluster.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/redis_sentinel.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/storage/registry.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/strategies.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/typing.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/util.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits/version.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits.egg-info/SOURCES.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits.egg-info/dependency_links.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits.egg-info/not-zip-safe +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits.egg-info/requires.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/limits.egg-info/top_level.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/pyproject.toml +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/ci.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/dev.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/docs.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/main.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/async-memcached.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/async-mongodb.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/async-redis.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/async-valkey.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/memcached.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/mongodb.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/redis.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/rediscluster.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/storage/valkey.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/requirements/test.txt +0 -0
- {limits-5.2.0 → limits-5.3.0}/setup.cfg +0 -0
- {limits-5.2.0 → limits-5.3.0}/setup.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/tests/test_limit_granularities.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/tests/test_limits.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/tests/test_ratelimit_parser.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/tests/test_storage.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/tests/test_strategy.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/tests/test_utils.py +0 -0
- {limits-5.2.0 → limits-5.3.0}/versioneer.py +0 -0
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Changelog
|
|
4
4
|
=========
|
|
5
5
|
|
|
6
|
+
v5.3.0
|
|
7
|
+
------
|
|
8
|
+
Release Date: 2025-06-13
|
|
9
|
+
|
|
10
|
+
* Bug Fix
|
|
11
|
+
|
|
12
|
+
* Fix race condition during expiration of in-memory
|
|
13
|
+
moving window limits that resulted in incorrectly removing
|
|
14
|
+
unexpired entries.
|
|
15
|
+
`Issue 277 <https://github.com/alisaifee/limits/issues/277>`_
|
|
16
|
+
|
|
6
17
|
v5.2.0
|
|
7
18
|
------
|
|
8
19
|
Release Date: 2025-05-16
|
|
@@ -848,3 +859,4 @@ Release Date: 2015-01-08
|
|
|
848
859
|
|
|
849
860
|
|
|
850
861
|
|
|
862
|
+
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-06-13T16:23:24-0700",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "5.
|
|
14
|
+
"full-revisionid": "311fe101b2d63c03e8c6a8f0ab363dd49f3e733b",
|
|
15
|
+
"version": "5.3.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -65,13 +65,13 @@ class MemoryStorage(
|
|
|
65
65
|
try:
|
|
66
66
|
now = time.time()
|
|
67
67
|
for key in list(self.events.keys()):
|
|
68
|
-
cutoff = await asyncio.to_thread(
|
|
69
|
-
lambda evts: bisect.bisect_left(
|
|
70
|
-
evts, -now, key=lambda event: -event.expiry
|
|
71
|
-
),
|
|
72
|
-
self.events[key],
|
|
73
|
-
)
|
|
74
68
|
async with self.locks[key]:
|
|
69
|
+
cutoff = await asyncio.to_thread(
|
|
70
|
+
lambda evts: bisect.bisect_left(
|
|
71
|
+
evts, -now, key=lambda event: -event.expiry
|
|
72
|
+
),
|
|
73
|
+
self.events[key],
|
|
74
|
+
)
|
|
75
75
|
if self.events.get(key, []):
|
|
76
76
|
self.events[key] = self.events[key][:cutoff]
|
|
77
77
|
if not self.events.get(key, None):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|