python313Packages.limits: 4.0.1 -> 5.2.0
https://github.com/alisaifee/limits/releases/tag/5.2.0
This commit is contained in:
committed by
Robert Schütz
parent
ab741ed741
commit
aba99cbeb4
@@ -22,11 +22,12 @@
|
||||
redis,
|
||||
setuptools,
|
||||
typing-extensions,
|
||||
valkey,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "limits";
|
||||
version = "4.0.1";
|
||||
version = "5.2.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@@ -41,7 +42,7 @@ buildPythonPackage rec {
|
||||
postFetch = ''
|
||||
rm "$out/limits/_version.py"
|
||||
'';
|
||||
hash = "sha256-JXXjRVn3RQMqNYRYXF4LuV2DHzVF8PTeGepFkt4jDFM=";
|
||||
hash = "sha256-0D44XaSZtebMnn9mqXbaE7FB7usdu/eZ/4UE3Ye0oyA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -80,6 +81,7 @@ buildPythonPackage rec {
|
||||
# ];
|
||||
async-mongodb = [ motor ];
|
||||
async-etcd = [ aetcd ];
|
||||
valkey = [ valkey ];
|
||||
};
|
||||
|
||||
env = {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
diff --git a/tests/aio/test_storage.py b/tests/aio/test_storage.py
|
||||
index 9817d8d..1382c89 100644
|
||||
index 43fc5b1..9aa86ed 100644
|
||||
--- a/tests/aio/test_storage.py
|
||||
+++ b/tests/aio/test_storage.py
|
||||
@@ -96,102 +96,6 @@ class TestBaseStorage:
|
||||
"uri, args, expected_instance, fixture",
|
||||
[
|
||||
pytest.param("async+memory://", {}, MemoryStorage, None, id="in-memory"),
|
||||
@@ -153,94 +153,6 @@ class TestBaseStorage:
|
||||
marks=pytest.mark.memory,
|
||||
id="in-memory",
|
||||
),
|
||||
- pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {},
|
||||
@@ -93,23 +93,15 @@ index 9817d8d..1382c89 100644
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+etcd://localhost:2379",
|
||||
- {},
|
||||
- EtcdStorage,
|
||||
- lf("etcd"),
|
||||
- marks=pytest.mark.etcd,
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
class TestConcreteStorages:
|
||||
diff --git a/tests/test_storage.py b/tests/test_storage.py
|
||||
index c3961e7..4250dbf 100644
|
||||
index f9698c0..2062e3a 100644
|
||||
--- a/tests/test_storage.py
|
||||
+++ b/tests/test_storage.py
|
||||
@@ -101,110 +101,6 @@ class TestBaseStorage:
|
||||
@@ -148,102 +148,6 @@ class TestBaseStorage:
|
||||
"uri, args, expected_instance, fixture",
|
||||
[
|
||||
pytest.param("memory://", {}, MemoryStorage, None, id="in-memory"),
|
||||
@@ -208,280 +200,198 @@ index c3961e7..4250dbf 100644
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "etcd://localhost:2379",
|
||||
- {},
|
||||
- EtcdStorage,
|
||||
- lf("etcd"),
|
||||
- marks=pytest.mark.etcd,
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
class TestConcreteStorages:
|
||||
diff --git a/tests/utils.py b/tests/utils.py
|
||||
index b8350b7..be9167b 100644
|
||||
index 3341bcf..6dc2bc3 100644
|
||||
--- a/tests/utils.py
|
||||
+++ b/tests/utils.py
|
||||
@@ -66,75 +66,6 @@ all_storage = pytest.mark.parametrize(
|
||||
"uri, args, fixture",
|
||||
[
|
||||
pytest.param("memory://", {}, None, marks=pytest.mark.memory, id="in-memory"),
|
||||
- pytest.param(
|
||||
- "redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis_basic",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "memcached://localhost:22122",
|
||||
- {},
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "memcached://localhost:22122,localhost:22123",
|
||||
- {},
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "etcd://localhost:2379",
|
||||
- {},
|
||||
- lf("etcd"),
|
||||
- marks=[pytest.mark.etcd, pytest.mark.flaky],
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
@@ -90,186 +90,11 @@ ALL_STORAGES = {
|
||||
"memory": pytest.param(
|
||||
"memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- "redis": pytest.param(
|
||||
- "redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis_basic",
|
||||
- ),
|
||||
- "memcached": pytest.param(
|
||||
- "memcached://localhost:22122",
|
||||
- {},
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- "memcached-cluster": pytest.param(
|
||||
- "memcached://localhost:22122,localhost:22123",
|
||||
- {},
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- "redis-cluster": pytest.param(
|
||||
- "redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- "redis-cluster_auth": pytest.param(
|
||||
- "redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- "redis-ssl-cluster": pytest.param(
|
||||
- "redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- "redis-sentinel": pytest.param(
|
||||
- "redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- "mongodb": pytest.param(
|
||||
- "mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- "valkey": pytest.param(
|
||||
- "valkey://localhost:12379",
|
||||
- {},
|
||||
- lf("valkey_basic"),
|
||||
- marks=pytest.mark.valkey,
|
||||
- id="valkey_basic",
|
||||
- ),
|
||||
- "valkey-cluster": pytest.param(
|
||||
- "valkey+cluster://localhost:2001/",
|
||||
- {},
|
||||
- lf("valkey_cluster"),
|
||||
- marks=pytest.mark.valkey_cluster,
|
||||
- id="valkey-cluster",
|
||||
- ),
|
||||
}
|
||||
ALL_STORAGES_ASYNC = {
|
||||
"memory": pytest.param(
|
||||
"async+memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- "redis": pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- "memcached": pytest.param(
|
||||
- "async+memcached://localhost:22122",
|
||||
- {
|
||||
- "implementation": ASYNC_MEMCACHED_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- "memcached-cluster": pytest.param(
|
||||
- "async+memcached://localhost:22122,localhost:22123",
|
||||
- {
|
||||
- "implementation": ASYNC_MEMCACHED_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- "memcached-sasl": pytest.param(
|
||||
- "async+memcached://user:password@localhost:22124",
|
||||
- {
|
||||
- "implementation": ASYNC_MEMCACHED_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("memcached_sasl"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-sasl",
|
||||
- ),
|
||||
- "redis-cluster": pytest.param(
|
||||
- "async+redis+cluster://localhost:7001/",
|
||||
- {
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- "redis-cluster-auth": pytest.param(
|
||||
- "async+redis+cluster://:sekret@localhost:8400/",
|
||||
- {
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- "redis-ssl-cluster": pytest.param(
|
||||
- "async+redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- "redis-sentinel": pytest.param(
|
||||
- "async+redis+sentinel://localhost:26379/mymaster",
|
||||
- {
|
||||
- "use_replicas": False,
|
||||
- "implementation": ASYNC_REDIS_IMPLEMENTATION,
|
||||
- },
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- "mongodb": pytest.param(
|
||||
- "async+mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- "valkey": pytest.param(
|
||||
- "async+valkey://localhost:12379",
|
||||
- {},
|
||||
- lf("valkey_basic"),
|
||||
- marks=pytest.mark.valkey,
|
||||
- id="valkey_basic",
|
||||
- ),
|
||||
- "valkey-cluster": pytest.param(
|
||||
- "async+valkey+cluster://localhost:2001/",
|
||||
- {},
|
||||
- lf("valkey_cluster"),
|
||||
- marks=pytest.mark.valkey_cluster,
|
||||
- id="valkey-cluster",
|
||||
- ),
|
||||
}
|
||||
|
||||
@@ -142,54 +73,6 @@ moving_window_storage = pytest.mark.parametrize(
|
||||
"uri, args, fixture",
|
||||
[
|
||||
pytest.param("memory://", {}, None, marks=pytest.mark.memory, id="in-memory"),
|
||||
- pytest.param(
|
||||
- "redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -199,75 +82,6 @@ async_all_storage = pytest.mark.parametrize(
|
||||
pytest.param(
|
||||
"async+memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+memcached://localhost:22122",
|
||||
- {},
|
||||
- lf("memcached"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+memcached://localhost:22122,localhost:22123",
|
||||
- {},
|
||||
- lf("memcached_cluster"),
|
||||
- marks=[pytest.mark.memcached, pytest.mark.flaky],
|
||||
- id="memcached-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+etcd://localhost:2379",
|
||||
- {},
|
||||
- lf("etcd"),
|
||||
- marks=[pytest.mark.etcd, pytest.mark.flaky],
|
||||
- id="etcd",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
|
||||
@@ -277,53 +91,5 @@ async_moving_window_storage = pytest.mark.parametrize(
|
||||
pytest.param(
|
||||
"async+memory://", {}, None, marks=pytest.mark.memory, id="in-memory"
|
||||
),
|
||||
- pytest.param(
|
||||
- "async+redis://localhost:7379",
|
||||
- {},
|
||||
- lf("redis_basic"),
|
||||
- marks=pytest.mark.redis,
|
||||
- id="redis",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:7001/",
|
||||
- {},
|
||||
- lf("redis_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://:sekret@localhost:8400/",
|
||||
- {},
|
||||
- lf("redis_auth_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-cluster-auth",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+cluster://localhost:8301",
|
||||
- {
|
||||
- "ssl": True,
|
||||
- "ssl_cert_reqs": "required",
|
||||
- "ssl_keyfile": "./tests/tls/client.key",
|
||||
- "ssl_certfile": "./tests/tls/client.crt",
|
||||
- "ssl_ca_certs": "./tests/tls/ca.crt",
|
||||
- },
|
||||
- lf("redis_ssl_cluster"),
|
||||
- marks=pytest.mark.redis_cluster,
|
||||
- id="redis-ssl-cluster",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+redis+sentinel://localhost:26379/mymaster",
|
||||
- {"use_replicas": False},
|
||||
- lf("redis_sentinel"),
|
||||
- marks=pytest.mark.redis_sentinel,
|
||||
- id="redis-sentinel",
|
||||
- ),
|
||||
- pytest.param(
|
||||
- "async+mongodb://localhost:37017/",
|
||||
- {},
|
||||
- lf("mongodb"),
|
||||
- marks=pytest.mark.mongodb,
|
||||
- id="mongodb",
|
||||
- ),
|
||||
],
|
||||
)
|
||||
all_storage = pytest.mark.parametrize("uri, args, fixture", ALL_STORAGES.values())
|
||||
|
||||
Reference in New Issue
Block a user