limits 5.2.0__py3-none-any.whl → 5.3.0__py3-none-any.whl
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/_version.py +3 -3
- limits/aio/storage/memory.py +6 -6
- {limits-5.2.0.dist-info → limits-5.3.0.dist-info}/METADATA +1 -1
- {limits-5.2.0.dist-info → limits-5.3.0.dist-info}/RECORD +7 -7
- {limits-5.2.0.dist-info → limits-5.3.0.dist-info}/WHEEL +1 -1
- {limits-5.2.0.dist-info → limits-5.3.0.dist-info}/licenses/LICENSE.txt +0 -0
- {limits-5.2.0.dist-info → limits-5.3.0.dist-info}/top_level.txt +0 -0
limits/_version.py
CHANGED
|
@@ -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
|
|
limits/aio/storage/memory.py
CHANGED
|
@@ -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):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
limits/__init__.py,sha256=gPUFrt02kHF_syLjiVRSs-S4UVGpRMcM2VMFNhF6G24,748
|
|
2
|
-
limits/_version.py,sha256=
|
|
2
|
+
limits/_version.py,sha256=zdxTHiQVSU3wNvKwUyOaoK8MMVvzbTzqFicCzdjC7j4,497
|
|
3
3
|
limits/errors.py,sha256=s1el9Vg0ly-z92guvnvYNgKi3_aVqpiw_sufemiLLTI,662
|
|
4
4
|
limits/limits.py,sha256=YzzZP8_ay_zlMMnnY2xhAcFTTFvFe5HEk8NQlvUTru4,4907
|
|
5
5
|
limits/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -11,7 +11,7 @@ limits/aio/__init__.py,sha256=yxvWb_ZmV245Hg2LqD365WC5IDllcGDMw6udJ1jNp1g,118
|
|
|
11
11
|
limits/aio/strategies.py,sha256=XSNE0SOSbJDjlodA_8AsL7oBYdfIn3JYh6iuR2z_cyU,10132
|
|
12
12
|
limits/aio/storage/__init__.py,sha256=vKeArUnN1ld_0mQOBBZPCjaQgM5xI1GBPM7_F2Ydz5c,646
|
|
13
13
|
limits/aio/storage/base.py,sha256=56UyNz3I3J-4pQecjsaCK4pUC4L3R_9GzDnutdTrfKs,6706
|
|
14
|
-
limits/aio/storage/memory.py,sha256
|
|
14
|
+
limits/aio/storage/memory.py,sha256=-U_GWPWmR77Hzi1Oa1_L1WjiAlROTS8PNG8PROAm13c,9842
|
|
15
15
|
limits/aio/storage/mongodb.py,sha256=0kwDyivA53ZIOUH4DNnCjVG3olLJqAWhXctjPrnHUp0,19252
|
|
16
16
|
limits/aio/storage/memcached/__init__.py,sha256=SjAEgxC6hPjobtyTf7tq3vThPMMbS4lGdtTo5kvoz64,6885
|
|
17
17
|
limits/aio/storage/memcached/bridge.py,sha256=3CEruS6LvZWDQPGPLlwY4hemy6oN0WWduUE7t8vyXBI,2017
|
|
@@ -37,8 +37,8 @@ limits/storage/redis.py,sha256=zTwxV5qosxGBTrkZmD4UWQdvavDbWpYHXY7H3hXH-Sw,10791
|
|
|
37
37
|
limits/storage/redis_cluster.py,sha256=GkL8GCQFfxDriMzsPMkaj6pMEX5FvQXYpUtXLY5q8fQ,4621
|
|
38
38
|
limits/storage/redis_sentinel.py,sha256=OSb61DxgUxMgXSIjaM_pF5-entD8XntD56xt0rFu89k,4479
|
|
39
39
|
limits/storage/registry.py,sha256=CxSaDBGR5aBJPFAIsfX9axCnbcThN3Bu-EH4wHrXtu8,650
|
|
40
|
-
limits-5.
|
|
41
|
-
limits-5.
|
|
42
|
-
limits-5.
|
|
43
|
-
limits-5.
|
|
44
|
-
limits-5.
|
|
40
|
+
limits-5.3.0.dist-info/licenses/LICENSE.txt,sha256=T6i7kq7F5gIPfcno9FCxU5Hcwm22Bjq0uHZV3ElcjsQ,1061
|
|
41
|
+
limits-5.3.0.dist-info/METADATA,sha256=saaz-nkRG9gi-N5HyQ2eFhNjvPe2TrJnScsaZTkowEM,10900
|
|
42
|
+
limits-5.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
limits-5.3.0.dist-info/top_level.txt,sha256=C7g5ahldPoU2s6iWTaJayUrbGmPK1d6e9t5Nn0vQ2jM,7
|
|
44
|
+
limits-5.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|