limits 4.5__tar.gz → 4.6__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.
Files changed (90) hide show
  1. {limits-4.5 → limits-4.6}/HISTORY.rst +10 -0
  2. {limits-4.5 → limits-4.6}/PKG-INFO +1 -1
  3. {limits-4.5 → limits-4.6}/limits/_version.py +3 -3
  4. {limits-4.5 → limits-4.6}/limits/aio/storage/mongodb.py +3 -0
  5. {limits-4.5 → limits-4.6}/limits/storage/mongodb.py +4 -0
  6. {limits-4.5 → limits-4.6}/limits.egg-info/PKG-INFO +1 -1
  7. {limits-4.5 → limits-4.6}/CLASSIFIERS +0 -0
  8. {limits-4.5 → limits-4.6}/CONTRIBUTIONS.rst +0 -0
  9. {limits-4.5 → limits-4.6}/LICENSE.txt +0 -0
  10. {limits-4.5 → limits-4.6}/MANIFEST.in +0 -0
  11. {limits-4.5 → limits-4.6}/README.rst +0 -0
  12. {limits-4.5 → limits-4.6}/doc/Makefile +0 -0
  13. {limits-4.5 → limits-4.6}/doc/source/_static/custom.css +0 -0
  14. {limits-4.5 → limits-4.6}/doc/source/api.rst +0 -0
  15. {limits-4.5 → limits-4.6}/doc/source/async.rst +0 -0
  16. {limits-4.5 → limits-4.6}/doc/source/changelog.rst +0 -0
  17. {limits-4.5 → limits-4.6}/doc/source/conf.py +0 -0
  18. {limits-4.5 → limits-4.6}/doc/source/custom-storage.rst +0 -0
  19. {limits-4.5 → limits-4.6}/doc/source/index.rst +0 -0
  20. {limits-4.5 → limits-4.6}/doc/source/installation.rst +0 -0
  21. {limits-4.5 → limits-4.6}/doc/source/quickstart.rst +0 -0
  22. {limits-4.5 → limits-4.6}/doc/source/storage.rst +0 -0
  23. {limits-4.5 → limits-4.6}/doc/source/strategies.rst +0 -0
  24. {limits-4.5 → limits-4.6}/doc/source/theme_config.py +0 -0
  25. {limits-4.5 → limits-4.6}/limits/__init__.py +0 -0
  26. {limits-4.5 → limits-4.6}/limits/aio/__init__.py +0 -0
  27. {limits-4.5 → limits-4.6}/limits/aio/storage/__init__.py +0 -0
  28. {limits-4.5 → limits-4.6}/limits/aio/storage/base.py +0 -0
  29. {limits-4.5 → limits-4.6}/limits/aio/storage/etcd.py +0 -0
  30. {limits-4.5 → limits-4.6}/limits/aio/storage/memcached.py +0 -0
  31. {limits-4.5 → limits-4.6}/limits/aio/storage/memory.py +0 -0
  32. {limits-4.5 → limits-4.6}/limits/aio/storage/redis/__init__.py +0 -0
  33. {limits-4.5 → limits-4.6}/limits/aio/storage/redis/bridge.py +0 -0
  34. {limits-4.5 → limits-4.6}/limits/aio/storage/redis/coredis.py +0 -0
  35. {limits-4.5 → limits-4.6}/limits/aio/storage/redis/redispy.py +0 -0
  36. {limits-4.5 → limits-4.6}/limits/aio/storage/redis/valkey.py +0 -0
  37. {limits-4.5 → limits-4.6}/limits/aio/strategies.py +0 -0
  38. {limits-4.5 → limits-4.6}/limits/errors.py +0 -0
  39. {limits-4.5 → limits-4.6}/limits/limits.py +0 -0
  40. {limits-4.5 → limits-4.6}/limits/py.typed +0 -0
  41. {limits-4.5 → limits-4.6}/limits/resources/redis/lua_scripts/acquire_moving_window.lua +0 -0
  42. {limits-4.5 → limits-4.6}/limits/resources/redis/lua_scripts/acquire_sliding_window.lua +0 -0
  43. {limits-4.5 → limits-4.6}/limits/resources/redis/lua_scripts/clear_keys.lua +0 -0
  44. {limits-4.5 → limits-4.6}/limits/resources/redis/lua_scripts/incr_expire.lua +0 -0
  45. {limits-4.5 → limits-4.6}/limits/resources/redis/lua_scripts/moving_window.lua +0 -0
  46. {limits-4.5 → limits-4.6}/limits/resources/redis/lua_scripts/sliding_window.lua +0 -0
  47. {limits-4.5 → limits-4.6}/limits/storage/__init__.py +0 -0
  48. {limits-4.5 → limits-4.6}/limits/storage/base.py +0 -0
  49. {limits-4.5 → limits-4.6}/limits/storage/etcd.py +0 -0
  50. {limits-4.5 → limits-4.6}/limits/storage/memcached.py +0 -0
  51. {limits-4.5 → limits-4.6}/limits/storage/memory.py +0 -0
  52. {limits-4.5 → limits-4.6}/limits/storage/redis.py +0 -0
  53. {limits-4.5 → limits-4.6}/limits/storage/redis_cluster.py +0 -0
  54. {limits-4.5 → limits-4.6}/limits/storage/redis_sentinel.py +0 -0
  55. {limits-4.5 → limits-4.6}/limits/storage/registry.py +0 -0
  56. {limits-4.5 → limits-4.6}/limits/strategies.py +0 -0
  57. {limits-4.5 → limits-4.6}/limits/typing.py +0 -0
  58. {limits-4.5 → limits-4.6}/limits/util.py +0 -0
  59. {limits-4.5 → limits-4.6}/limits/version.py +0 -0
  60. {limits-4.5 → limits-4.6}/limits.egg-info/SOURCES.txt +0 -0
  61. {limits-4.5 → limits-4.6}/limits.egg-info/dependency_links.txt +0 -0
  62. {limits-4.5 → limits-4.6}/limits.egg-info/not-zip-safe +0 -0
  63. {limits-4.5 → limits-4.6}/limits.egg-info/requires.txt +0 -0
  64. {limits-4.5 → limits-4.6}/limits.egg-info/top_level.txt +0 -0
  65. {limits-4.5 → limits-4.6}/pyproject.toml +0 -0
  66. {limits-4.5 → limits-4.6}/requirements/ci.txt +0 -0
  67. {limits-4.5 → limits-4.6}/requirements/dev.txt +0 -0
  68. {limits-4.5 → limits-4.6}/requirements/docs.txt +0 -0
  69. {limits-4.5 → limits-4.6}/requirements/main.txt +0 -0
  70. {limits-4.5 → limits-4.6}/requirements/storage/async-etcd.txt +0 -0
  71. {limits-4.5 → limits-4.6}/requirements/storage/async-memcached.txt +0 -0
  72. {limits-4.5 → limits-4.6}/requirements/storage/async-mongodb.txt +0 -0
  73. {limits-4.5 → limits-4.6}/requirements/storage/async-redis.txt +0 -0
  74. {limits-4.5 → limits-4.6}/requirements/storage/async-valkey.txt +0 -0
  75. {limits-4.5 → limits-4.6}/requirements/storage/etcd.txt +0 -0
  76. {limits-4.5 → limits-4.6}/requirements/storage/memcached.txt +0 -0
  77. {limits-4.5 → limits-4.6}/requirements/storage/mongodb.txt +0 -0
  78. {limits-4.5 → limits-4.6}/requirements/storage/redis.txt +0 -0
  79. {limits-4.5 → limits-4.6}/requirements/storage/rediscluster.txt +0 -0
  80. {limits-4.5 → limits-4.6}/requirements/storage/valkey.txt +0 -0
  81. {limits-4.5 → limits-4.6}/requirements/test.txt +0 -0
  82. {limits-4.5 → limits-4.6}/setup.cfg +0 -0
  83. {limits-4.5 → limits-4.6}/setup.py +0 -0
  84. {limits-4.5 → limits-4.6}/tests/test_limit_granularities.py +0 -0
  85. {limits-4.5 → limits-4.6}/tests/test_limits.py +0 -0
  86. {limits-4.5 → limits-4.6}/tests/test_ratelimit_parser.py +0 -0
  87. {limits-4.5 → limits-4.6}/tests/test_storage.py +0 -0
  88. {limits-4.5 → limits-4.6}/tests/test_strategy.py +0 -0
  89. {limits-4.5 → limits-4.6}/tests/test_utils.py +0 -0
  90. {limits-4.5 → limits-4.6}/versioneer.py +0 -0
@@ -3,6 +3,15 @@
3
3
  Changelog
4
4
  =========
5
5
 
6
+ v4.6
7
+ ----
8
+ Release Date: 2025-04-03
9
+
10
+ * Bug Fix
11
+
12
+ * Ensure mongo clients are closed on storage destruction.
13
+ `Issue 264 <https://github.com/alisaifee/limits/issues/264>`_
14
+
6
15
  v4.5
7
16
  ----
8
17
  Release Date: 2025-04-03
@@ -836,5 +845,6 @@ Release Date: 2015-01-08
836
845
 
837
846
 
838
847
 
848
+
839
849
 
840
850
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: limits
3
- Version: 4.5
3
+ Version: 4.6
4
4
  Summary: Rate limiting utilities
5
5
  Home-page: https://limits.readthedocs.org
6
6
  Author: Ali-Akber Saifee
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-04-03T09:10:26-0700",
11
+ "date": "2025-04-03T09:33:38-0700",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "600e96abcf2692e49909b8cf6ca19fc0ee3b2ac3",
15
- "version": "4.5"
14
+ "full-revisionid": "32d9fb7f2e290c890e52fd64b27550f59dd35583",
15
+ "version": "4.6"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -517,3 +517,6 @@ class MongoDBStorage(Storage, MovingWindowSupport, SlidingWindowCounterSupport):
517
517
  current_ttl,
518
518
  )
519
519
  return 0, 0.0, 0, 0.0
520
+
521
+ def __del__(self) -> None:
522
+ self.storage and self.storage.close()
@@ -479,6 +479,10 @@ class MongoDBStorageBase(
479
479
  )
480
480
  return cast(bool, result["_acquired"])
481
481
 
482
+ def __del__(self) -> None:
483
+ if self.storage:
484
+ self.storage.close()
485
+
482
486
 
483
487
  @versionadded(version="2.1")
484
488
  @versionchanged(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: limits
3
- Version: 4.5
3
+ Version: 4.6
4
4
  Summary: Rate limiting utilities
5
5
  Home-page: https://limits.readthedocs.org
6
6
  Author: Ali-Akber Saifee
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