From 75e4828a518420ddbed0bc16e685f863b539dc14 Mon Sep 17 00:00:00 2001 From: amirreza Date: Thu, 14 Nov 2024 18:23:31 +0330 Subject: [PATCH 1/8] dependency update --- poetry.lock | 123 +++++++++++++++++++++++++++++++++++++++++++++---- pyproject.toml | 5 +- 2 files changed, 118 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 355bf9a..7c582bb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -836,6 +836,109 @@ completion = ["shtab (>=1.1.0)"] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +[[package]] +name = "libvalkey" +version = "4.0.0" +description = "Python wrapper for libvalkey" +optional = true +python-versions = ">=3.8" +files = [ + {file = "libvalkey-4.0.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:97dbc5018adc0960b7f59c2bbb7234fd430e94c8d23ce3acd71fa0b28228dd98"}, + {file = "libvalkey-4.0.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:8818191a053b6d1f34c4be24091208fe5b2d0739b266ce391aff1fc4a79eb82e"}, + {file = "libvalkey-4.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f0a71903033c7020723ba7b6be2bee19da21f295a0664976000dc6070fbf9af"}, + {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:463d464e754b5c465eb2d8ce1d109b55081953377955df87fade661921033cdb"}, + {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c37b217cdcc7f9045cbdb57d5b7a29f2df8087b055f8333e0fa857f4d6d483a"}, + {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d36f518e1863ef877d6889c22987af877567eecb847e18646b2c28ab8d5501f8"}, + {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8024424df89d83fb6ed8048288db870aac41b56b229373a8c559a335e5eec5aa"}, + {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7dc7977e1eca4c3a0db9032f504b5b95251fef13d3a4123913b4ffd52979ea27"}, + {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1cd48c0fbb1f3a5103d0352a367018488cea7e438616ce573624e4b0c4d585ff"}, + {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:57eb009c2b7d6fe262c897638fe1a90d8bd83a2ac5ec24e6bcb967dea7f048ef"}, + {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:b835c70ad0d0c132e08f7b503fbfa064b113362fafa99977a59ce63becb5aa15"}, + {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:a4fe1000ad3498f01ab3049488ab079fb57c9aec301f42d4110dd3dda525ee60"}, + {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:453a3ec883c8b3c31cd86b525a230cfece4c665683badd27de4ef4294e790bf5"}, + {file = "libvalkey-4.0.0-cp310-cp310-win32.whl", hash = "sha256:54dda435d9782f51cb9feefa4c1b6d75a0cd323f0360d8ca6b590c2cec852422"}, + {file = "libvalkey-4.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:aab44979b80888510c7208a0a5b607db38da66aa3cc3cbdca2e75b19d1ae2294"}, + {file = "libvalkey-4.0.0-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:16ee32ba10cb07a5c181e9ab14dd6e06abf4bcb1fe38c71280d97e7a25df85b6"}, + {file = "libvalkey-4.0.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:bb6e3e92d640a2b366de44024c5063edf9f1f8b7d22892d1fd7fad1da165ce9e"}, + {file = "libvalkey-4.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2b7fca5cc5fec2739054e591fd25fab48128250950018981d63dba1328e165f1"}, + {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7457e57a7d618e96e63dac8f2268999b8817d33e9e76f1b409ce552ae71b7e2b"}, + {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa16938031b16c2deb5d03617346f966f404f754b13e9fd730f4e9d808b98213"}, + {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:69eeb03ddd89fb99fbba4085ad4be74b43b921924b7fca9dff9ef343454d0a98"}, + {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e22dad7042d090109892b97d41bf51d4ad81be2db2292c3f45ed30686786d604"}, + {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:926fe72263924065485ce516f94cb409e93c86351c10743298e44cdfe1bfd7c0"}, + {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4d60a1eb6ae18fb5b06db55d40eb181ce83a9f92735ded6457fda790c716a998"}, + {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:078b00cb30a7a9f5fc93b8f01103eb5d099b7c6d1a2fc7a59bb01e68f29c3684"}, + {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f2e16738c756cbf07eee0c3807984cb363873e78d8aef15e47e15153804bdf4c"}, + {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:16b02b974dd8520551a4bdf0f66e31262d2f44e894ef04f640c8c59b380a0586"}, + {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7bc0d7a26d3b1fb0ecc1cd0b935c97017da8f5e9a36b2a108d8fed0fa463c143"}, + {file = "libvalkey-4.0.0-cp311-cp311-win32.whl", hash = "sha256:73cad7eda136f8163fae0d3994f5bde8e9225a77e2de85a546a8ddca188ac925"}, + {file = "libvalkey-4.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:0975ceb9440eddd9590f6400a7c32b109f9e45cd48b6d8276bafbbb7cddf4ec3"}, + {file = "libvalkey-4.0.0-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:1c6cadc12cc0197d7a7d6fc8cc321f921b5d87ec218a39839a76c0b284476708"}, + {file = "libvalkey-4.0.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:291d40d277e2d3190955d3b642ec12be8bf9fe160dffa032b83c2b4f1ce71356"}, + {file = "libvalkey-4.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f2c3fe73a1ba6d9b21cada86156873d161cdd09b69c11aad39d80e45560c447a"}, + {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c64ba99ff2084d1b7e90f2fcb891e40848e3f39aa5868bff0dfe1f3f83bbaab2"}, + {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:430a9c2d834a1be2ba6dc9d5391baaffb5353860315148cd222138b1480baaf9"}, + {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d11db361d5673659efc4fc3728f92604d8b83de467e377e4da379bec6a5edf7"}, + {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9d15ff24f8ef73ab1fa2e608ddc4babfbb68044cbd8e13a6052e8ccbda6adec3"}, + {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a43210584746dcccd595920393b41a7e48a30f021b521414d51fd31c0584248b"}, + {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:59fce74dcc7eab247b57e1db890a44388aa7722a5b19a3db1932aa96d1cd8d0f"}, + {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c32f0ca032b6727e2c0b0a8cd0c4590912ab452c61e298f871eff6f660eb1fc9"}, + {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:967e22774141da1c92a8a646d8e7024a02670ec94d604f34106f263fe0082188"}, + {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:72d1ddfe848b7ec2d4c615316e2b120e0e8a52ded3546b0b5b547d5431fe2ba1"}, + {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:aa334ff652090e6c07d2c3a89320d71479f30efc538c61971b959b1e0267562b"}, + {file = "libvalkey-4.0.0-cp312-cp312-win32.whl", hash = "sha256:3db84d01d84ca0d3b98a6f88b2ecbfbd1952a03e91c97b13f1e0a138124832a1"}, + {file = "libvalkey-4.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:9e2aba07c0f7a37432c135f664cae413d31ed00321440c8ac0fed68464f9f420"}, + {file = "libvalkey-4.0.0-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:faa02bb28e478c2623fe26815d7b5d2a7ad68e9fcf3e4466a07777f4d17f6ce0"}, + {file = "libvalkey-4.0.0-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d536178df1596c35ac32bcd7836d300f4bc68dc1582ffac8027558442637c0f9"}, + {file = "libvalkey-4.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c3a5d8776de930aa6eca1f835d9cd6cb35f0ea0821943d52022f2b75c1f0dbf"}, + {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:911b7542c2d33b97e276500f99bb608e112341e41d7922331c11b3e12a77885c"}, + {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca394e737edae7c82ff851f1fa429b9eee11c4fc2cee6336271b318be0afe1f2"}, + {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9593e27881e2b848ba81ff546be289af814093a492c4bbb6f837b701d22b802f"}, + {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7465dca91e916a9afb94a356bb37750a3715d53de466d30ba9eafaae1b4b4716"}, + {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a000914e330559c714b048d53049eb7fe49e556b703a90d037ecc98ff11e6f9b"}, + {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:5ace17dd14382d1d7286294481f23244e45b8781435aee879f0c0cda8974bf5d"}, + {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:834bc422727cfb05fe6a360a865751c287e881d32a4b90588ded3b698a6e5eec"}, + {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:735dc00127d9fda43c8d82b929b165172313adb025f4c44c2391a295760b0194"}, + {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:0025a7cd55afd9421738ee08919788b0f04c60c89a25a8d80d29bce3edea17c9"}, + {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:8afffad6e2b9938ea68bcf7a0db53ed288f4c15fe8bd0b7342bd1c3893de9dd7"}, + {file = "libvalkey-4.0.0-cp38-cp38-win32.whl", hash = "sha256:19ab19e7f387931bb5b974b29959946f01e64122e78706ef4066b38d1cec734f"}, + {file = "libvalkey-4.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:12f531e13ff901f6cd9fd431977ebbc86e6779dfcb6a52988deafef8774f6b47"}, + {file = "libvalkey-4.0.0-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:a30332e7be16c1043238880135d064f14b8ec30c4e5e7a934d9a4667c14dac15"}, + {file = "libvalkey-4.0.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:359f223c24dfe2e2872f256fe276c3e11842ea04d77e0df1326a0c308632c6d2"}, + {file = "libvalkey-4.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b629751f4b23f539eabb6060c30f23274c890bb9408a7c674eb9d8b9320dc4b9"}, + {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae9517fef93613b5189fac8849ade4381658ea452774e7a8e9c7ddbf2c5ae57f"}, + {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bed1bb33404ca1e225a9557fa438336a25bfd9d94f2dba641c4b8612af19cc2b"}, + {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfd59af8b9142ec22de34f9ff0fb68afcaa8d37f7021bdb935c8fa5d686cd14c"}, + {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8785e9fafb7825fad92e5585aaab615678da84561963e1f0f111bbdc3fbb170"}, + {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0dff4f2b1872ab9fe3aaade5fe329238ac54726c7de771c86882838ac9c25334"}, + {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5468fdbe7c478e433a3fd43a0636f6e80a5eb8067fa2ba351396f4ad94d300c0"}, + {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:8aea128b12b40afbff59a271bd130a49d8b251e0262047dc933e2098b229a1bf"}, + {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8702c9dc4f5fe1f017ca02cfaae86df9be571b41c8707cd316156b301c399865"}, + {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:647623029d92b407688a9c964bc7ca18e27ef0757f662a0e175a0034fdaeaa07"}, + {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:4105120b87ba66f5d95cadfdbd26c9d372df3cd78177e28d9451c151a3f20613"}, + {file = "libvalkey-4.0.0-cp39-cp39-win32.whl", hash = "sha256:f49b8174cfad6858f0725d9967d7016af851f6b54beb8e1bc2276728e343f631"}, + {file = "libvalkey-4.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:d381de880b8dbd739a0f3d76d7fbf9d75b244d81e4cdd11880a7128cf7c40301"}, + {file = "libvalkey-4.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0cfec0c9d6d89fdec9467b6fe29430b8f3d36189c4187e3db196860b67e4161c"}, + {file = "libvalkey-4.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:537a6ad812458200d19988789a9e8d75f14d20d1decaf0139286f1cc5258959a"}, + {file = "libvalkey-4.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:832430c53715f16afb2dd2f5ebeaf2e81b3014cd19f587180a470743096c8fc6"}, + {file = "libvalkey-4.0.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8fb034377dffac04e085d881cfe3aa41d698ed3400cc2f1f8f982cf9863f92cf"}, + {file = "libvalkey-4.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3638702abc549bd560c574a9c7f8336980323538498838846b64ad89bb24e513"}, + {file = "libvalkey-4.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:3e880632226ce5192f472a6c427bb560020b4e0cf609fd92504ee89a566d2983"}, + {file = "libvalkey-4.0.0-pp38-pypy38_pp73-macosx_10_15_x86_64.whl", hash = "sha256:22f9b5fdd2fa52d9f3e3d581794b8e44692de469f181b7549c96571465b1feab"}, + {file = "libvalkey-4.0.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:6a04d0fe63850c95e1a847043f93825a1d9b04537cf5bde2d12c548acdda17bb"}, + {file = "libvalkey-4.0.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51c774997fbd5f16ad6e196d1449cb3eaee171f847148bc2aeb6e52f50134ac9"}, + {file = "libvalkey-4.0.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:92d05d88a1926d2bca72a7cfd55b90f2b2e49c19ba5d4f06620c8e32a312c4fa"}, + {file = "libvalkey-4.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90b6743ddaf96365600bf0df2d928584958e0ac7fac85404dbceedb165992a68"}, + {file = "libvalkey-4.0.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4fc803e8d94ef3bbe09d55f81641e0eff35b35519914501973e00d5e549ac976"}, + {file = "libvalkey-4.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e001e72c47e8bc29e18d15f22e4ef3b9d2e52928e9d23471ba9502b0ce67c0d0"}, + {file = "libvalkey-4.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:19a56359350b76a564bd5acf820bcda84d447e3269f316352c5f77c97c7be905"}, + {file = "libvalkey-4.0.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65d89f152490086d2145acf79a7b3049aa75ed6e49022e2cb924f04ec404ec6f"}, + {file = "libvalkey-4.0.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b26e2af0b4a36feef67660860ad347a1aa56f85c5bcdb691158aa8999878e9bc"}, + {file = "libvalkey-4.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2d7d17779f099abcdb7a1874c42bb8089231c54a44386643878af11271b73c3"}, + {file = "libvalkey-4.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f911f95b55144c1c021846c1e62ee9495291d028da39fd33470a7db8c330843a"}, + {file = "libvalkey-4.0.0.tar.gz", hash = "sha256:b69354798f115f25e4fdccf0b9045baa429a1d55c5c3b653dc3ef2c9e3762807"}, +] + [[package]] name = "lupa" version = "2.2" @@ -1536,13 +1639,13 @@ files = [ [[package]] name = "sqlparse" -version = "0.5.1" +version = "0.5.2" description = "A non-validating SQL parser." optional = false python-versions = ">=3.8" files = [ - {file = "sqlparse-0.5.1-py3-none-any.whl", hash = "sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4"}, - {file = "sqlparse-0.5.1.tar.gz", hash = "sha256:bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e"}, + {file = "sqlparse-0.5.2-py3-none-any.whl", hash = "sha256:e99bc85c78160918c3e1d9230834ab8d80fc06c59d03f8db2618f65f65dda55e"}, + {file = "sqlparse-0.5.2.tar.gz", hash = "sha256:9e37b35e16d1cc652a2545f0997c1deb23ea28fa1f3eefe609eee3063c3b105f"}, ] [package.extras] @@ -1623,17 +1726,17 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "valkey" -version = "6.0.1" +version = "6.0.2" description = "Python client for Valkey forked from redis-py" -optional = false +optional = true python-versions = ">=3.8" files = [ - {file = "valkey-6.0.1-py3-none-any.whl", hash = "sha256:6702bf323e88e50ef0be37aad697bcc6334edd40cc66f01259265dd410fa22dc"}, - {file = "valkey-6.0.1.tar.gz", hash = "sha256:58f4628dc038ab5aa04eea6e75557309c9412a8c45e81ad42d53e42b9a36e7dc"}, + {file = "valkey-6.0.2-py3-none-any.whl", hash = "sha256:dbbdd65439ee0dc5689502c54f1899504cc7268e85cb7fe8935f062178ff5805"}, + {file = "valkey-6.0.2.tar.gz", hash = "sha256:dc2e91512b82d1da0b91ab0cdbd8c97c0c0250281728cb32f9398760df9caeae"}, ] [package.dependencies] -async-timeout = {version = ">=4.0.3", markers = "python_version < \"3.11\""} +async-timeout = {version = ">=4.0.3", markers = "python_version < \"3.11.3\""} [package.extras] libvalkey = ["libvalkey (>=4.0.0)"] @@ -1752,9 +1855,11 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", type = ["pytest-mypy"] [extras] +valkey = ["valkey"] +valkey-full = ["libvalkey", "valkey"] yaml = ["pyyaml"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "641d4bec80938f6c858d36d4d4cce1226021cd0a99263de0f9d3e9a240ae4512" +content-hash = "326a461ad7042b3389a0ae92d460be1b7e206b43511f7a9bc56d87245e9b6c2a" diff --git a/pyproject.toml b/pyproject.toml index 2e375aa..f2f99cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,8 @@ croniter = ">=2.0" click = "^8.1" rq = "^1.16" pyyaml = { version = "^6.0", optional = true } -valkey = "6.0.1" +valkey = { version = "^6.0.2", optional = true} +libvalkey = { version = "^4.0.0", optional = true} [tool.poetry.dev-dependencies] poetry = "^1.8.3" @@ -60,6 +61,8 @@ freezegun = "^1.5" [tool.poetry.extras] yaml = ["pyyaml"] +valkey = ["valkey"] +valkey_full = ["valkey","libvalkey"] [tool.flake8] max-line-length = 120 From 11ee71e944b50fb676f5f819edb7e1a7cee6396c Mon Sep 17 00:00:00 2001 From: amirreza Date: Thu, 14 Nov 2024 19:05:17 +0330 Subject: [PATCH 2/8] added valkey sentinel support --- scheduler/connection_types.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scheduler/connection_types.py b/scheduler/connection_types.py index 70405d6..3b8c61a 100644 --- a/scheduler/connection_types.py +++ b/scheduler/connection_types.py @@ -1,7 +1,11 @@ from typing import Union, Dict, Tuple, Type import redis -import valkey +try: + import valkey +except ImportError: + valkey = redis + valkey.Valkey = redis.Redis from scheduler.settings import Broker @@ -9,6 +13,7 @@ ConnectionType = Union[redis.Redis, valkey.Valkey] PipelineType = Union[redis.client.Pipeline, valkey.client.Pipeline] RedisSentinel = redis.sentinel.Sentinel +ValkeySentinel = valkey.sentinel.Sentinel BrokerConnectionClass: Dict[Tuple[Broker, bool], Type] = { # Map of (Broker, Strict flag) => Connection Class From e60f40faedb21c22d39b8ceac831fd560f62ce09 Mon Sep 17 00:00:00 2001 From: amirreza Date: Thu, 14 Nov 2024 19:05:30 +0330 Subject: [PATCH 3/8] made broker connection more abstract to support more servers easier --- scheduler/queues.py | 54 +++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/scheduler/queues.py b/scheduler/queues.py index 636f67b..21b6303 100644 --- a/scheduler/queues.py +++ b/scheduler/queues.py @@ -1,13 +1,21 @@ from typing import List, Dict, Set import redis -import valkey -from .connection_types import RedisSentinel, BrokerConnectionClass +from .connection_types import RedisSentinel, ValkeySentinel, BrokerConnectionClass from .rq_classes import JobExecution, DjangoQueue, DjangoWorker from .settings import SCHEDULER_CONFIG from .settings import logger, Broker + +try: + from valkey import exceptions +except ImportError: + exceptions = "" + exceptions.ConnectionError = redis.ConnectionError + +ConnectionErrors = (redis.ConnectionError, exceptions.ConnectionError) + _CONNECTION_PARAMS = { "URL", "DB", @@ -28,31 +36,43 @@ class QueueNotFoundError(Exception): pass -def _get_redis_connection(config, use_strict_redis=False): +ssl_url_protocol = { + "valkey": "valkeys", + "redis": "rediss", + "fakeredis": "rediss" +} + +sentinel_broker = { + "valkey": ValkeySentinel, + "redis": RedisSentinel, +} + + +def _get_broker_connection(config, use_strict_broker=False): """ Returns a redis connection from a connection config """ if SCHEDULER_CONFIG.BROKER == Broker.FAKEREDIS: import fakeredis - redis_cls = fakeredis.FakeRedis if use_strict_redis else fakeredis.FakeStrictRedis + broker_cls = fakeredis.FakeRedis if not use_strict_broker else fakeredis.FakeStrictRedis else: - redis_cls = BrokerConnectionClass[(SCHEDULER_CONFIG.BROKER, use_strict_redis)] + broker_cls = BrokerConnectionClass[(SCHEDULER_CONFIG.BROKER, use_strict_broker)] logger.debug(f"Getting connection for {config}") if "URL" in config: - if config.get("SSL") or config.get("URL").startswith("rediss://"): - return redis_cls.from_url( + if config.get("SSL") or config.get("URL").startswith(f"{ssl_url_protocol[SCHEDULER_CONFIG.BROKER.value]}://"): + return broker_cls.from_url( config["URL"], db=config.get("DB"), ssl_cert_reqs=config.get("SSL_CERT_REQS", "required"), ) else: - return redis_cls.from_url( + return broker_cls.from_url( config["URL"], db=config.get("DB"), ) if "UNIX_SOCKET_PATH" in config: - return redis_cls(unix_socket_path=config["UNIX_SOCKET_PATH"], db=config["DB"]) + return broker_cls(unix_socket_path=config["UNIX_SOCKET_PATH"], db=config["DB"]) if "SENTINELS" in config: connection_kwargs = { @@ -63,13 +83,15 @@ def _get_redis_connection(config, use_strict_redis=False): } connection_kwargs.update(config.get("CONNECTION_KWARGS", {})) sentinel_kwargs = config.get("SENTINEL_KWARGS", {}) - sentinel = RedisSentinel(config["SENTINELS"], sentinel_kwargs=sentinel_kwargs, **connection_kwargs) + sentinel = sentinel_broker[SCHEDULER_CONFIG.BROKER.value]( + config["SENTINELS"], sentinel_kwargs=sentinel_kwargs, **connection_kwargs + ) return sentinel.master_for( service_name=config["MASTER_NAME"], - redis_class=redis_cls, + redis_class=broker_cls, ) - return redis_cls( + return broker_cls( host=config["HOST"], port=config["PORT"], db=config.get("DB", 0), @@ -82,8 +104,8 @@ def _get_redis_connection(config, use_strict_redis=False): def get_connection(queue_settings, use_strict_redis=False): - """Returns a Redis connection to use based on parameters in SCHEDULER_QUEUES""" - return _get_redis_connection(queue_settings, use_strict_redis) + """Returns a Broker connection to use based on parameters in SCHEDULER_QUEUES""" + return _get_broker_connection(queue_settings, use_strict_redis) def get_queue( @@ -116,7 +138,7 @@ def get_all_workers() -> Set[DjangoWorker]: try: curr_workers: Set[DjangoWorker] = set(DjangoWorker.all(connection=connection)) workers_set.update(curr_workers) - except (redis.ConnectionError, valkey.ConnectionError) as e: + except ConnectionErrors as e: logger.error(f"Could not connect for queue {queue_name}: {e}") return workers_set @@ -142,7 +164,7 @@ def get_queues(*queue_names, **kwargs) -> List[DjangoQueue]: for name in queue_names[1:]: if not _queues_share_connection_params(queue_params, QUEUES[name]): raise ValueError( - f'Queues must have the same redis connection. "{name}" and' + f'Queues must have the same broker connection. "{name}" and' f' "{queue_names[0]}" have different connections' ) queue = get_queue(name, **kwargs) From 7448938a06d50f8b0daf57a3487f2f6d31fa5e36 Mon Sep 17 00:00:00 2001 From: amirreza Date: Thu, 14 Nov 2024 19:05:40 +0330 Subject: [PATCH 4/8] organized imports to make valkey optional --- scheduler/views.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scheduler/views.py b/scheduler/views.py index d70d359..b0c5621 100644 --- a/scheduler/views.py +++ b/scheduler/views.py @@ -2,7 +2,6 @@ from math import ceil from typing import Tuple, Optional -import redis from django.contrib import admin, messages from django.contrib.admin.views.decorators import staff_member_required from django.core.paginator import Paginator @@ -14,12 +13,22 @@ from django.views.decorators.cache import never_cache from redis.exceptions import ResponseError -from .queues import get_all_workers, get_connection, QueueNotFoundError + +from .queues import get_all_workers, get_connection, QueueNotFoundError, ConnectionErrors from .queues import get_queue as get_queue_base from .rq_classes import JobExecution, DjangoWorker, DjangoQueue, InvalidJobOperation from .settings import SCHEDULER_CONFIG, logger +try: + from valkey import exceptions +except ImportError: + exceptions = "" + exceptions.ResponseError = ResponseError + +ResponseErrors = (ResponseError, exceptions.ResponseError) + + def get_queue(queue_name: str) -> DjangoQueue: try: return get_queue_base(queue_name) @@ -71,7 +80,7 @@ def get_statistics(run_maintenance_tasks=False): if run_maintenance_tasks: queue.clean_registries() - # Raw access to the first item from left of the redis list. + # Raw access to the first item from left of the broker list. # This might not be accurate since new job can be added from the left # with `at_front` parameters. # Ideally rq should supports Queue.oldest_job @@ -102,7 +111,7 @@ def get_statistics(run_maintenance_tasks=False): canceled_jobs=len(queue.canceled_job_registry), ) queues.append(queue_data) - except redis.ConnectionError as e: + except ConnectionErrors as e: logger.error(f"Could not connect for queue {queue_name}: {e}") continue @@ -277,7 +286,7 @@ def clear_queue_registry(request: HttpRequest, queue_name: str, registry_name: s for job_id in job_ids: registry.remove(job_id, delete_job=True) messages.info(request, f"You have successfully cleared the {registry_name} jobs in queue {queue.name}") - except ResponseError as e: + except ResponseErrors as e: messages.error( request, f"error: {e}", From 540e999593278c6de7e8bb114a0827f5a5b997d9 Mon Sep 17 00:00:00 2001 From: amirreza Date: Thu, 14 Nov 2024 19:05:49 +0330 Subject: [PATCH 5/8] adjust extra dependency for tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e115ebd..d979640 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,7 @@ jobs: run: | python -m pip --quiet install poetry echo "$HOME/.poetry/bin" >> $GITHUB_PATH - poetry install -E yaml + poetry install -E yaml -E valkey poetry run pip install django==${{ matrix.django-version }} - name: Get version From bbe6266b35a21397ee2000a09d220feae8512a7a Mon Sep 17 00:00:00 2001 From: Daniel M Date: Sat, 16 Nov 2024 09:34:00 -0500 Subject: [PATCH 6/8] remove libvalkey --- .github/workflows/test.yml | 5 +- poetry.lock | 234 +++++++++++-------------------------- pyproject.toml | 2 - 3 files changed, 69 insertions(+), 172 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d979640..0536ea6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,10 @@ jobs: run: | python -m pip --quiet install poetry echo "$HOME/.poetry/bin" >> $GITHUB_PATH - poetry install -E yaml -E valkey + if [ ${{ matrix.broker == 'valkey' }} == true ]; then + additional_args="-E valkey" + fi + poetry install -E yaml $additional_args poetry run pip install django==${{ matrix.django-version }} - name: Get version diff --git a/poetry.lock b/poetry.lock index 7c582bb..5979b58 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "asgiref" @@ -366,73 +366,73 @@ files = [ [[package]] name = "coverage" -version = "7.6.4" +version = "7.6.7" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f8ae553cba74085db385d489c7a792ad66f7f9ba2ee85bfa508aeb84cf0ba07"}, - {file = "coverage-7.6.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8165b796df0bd42e10527a3f493c592ba494f16ef3c8b531288e3d0d72c1f6f0"}, - {file = "coverage-7.6.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c8b95bf47db6d19096a5e052ffca0a05f335bc63cef281a6e8fe864d450a72"}, - {file = "coverage-7.6.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ed9281d1b52628e81393f5eaee24a45cbd64965f41857559c2b7ff19385df51"}, - {file = "coverage-7.6.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0809082ee480bb8f7416507538243c8863ac74fd8a5d2485c46f0f7499f2b491"}, - {file = "coverage-7.6.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d541423cdd416b78626b55f123412fcf979d22a2c39fce251b350de38c15c15b"}, - {file = "coverage-7.6.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:58809e238a8a12a625c70450b48e8767cff9eb67c62e6154a642b21ddf79baea"}, - {file = "coverage-7.6.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c9b8e184898ed014884ca84c70562b4a82cbc63b044d366fedc68bc2b2f3394a"}, - {file = "coverage-7.6.4-cp310-cp310-win32.whl", hash = "sha256:6bd818b7ea14bc6e1f06e241e8234508b21edf1b242d49831831a9450e2f35fa"}, - {file = "coverage-7.6.4-cp310-cp310-win_amd64.whl", hash = "sha256:06babbb8f4e74b063dbaeb74ad68dfce9186c595a15f11f5d5683f748fa1d172"}, - {file = "coverage-7.6.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:73d2b73584446e66ee633eaad1a56aad577c077f46c35ca3283cd687b7715b0b"}, - {file = "coverage-7.6.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:51b44306032045b383a7a8a2c13878de375117946d68dcb54308111f39775a25"}, - {file = "coverage-7.6.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3fb02fe73bed561fa12d279a417b432e5b50fe03e8d663d61b3d5990f29546"}, - {file = "coverage-7.6.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed8fe9189d2beb6edc14d3ad19800626e1d9f2d975e436f84e19efb7fa19469b"}, - {file = "coverage-7.6.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b369ead6527d025a0fe7bd3864e46dbee3aa8f652d48df6174f8d0bac9e26e0e"}, - {file = "coverage-7.6.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ade3ca1e5f0ff46b678b66201f7ff477e8fa11fb537f3b55c3f0568fbfe6e718"}, - {file = "coverage-7.6.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:27fb4a050aaf18772db513091c9c13f6cb94ed40eacdef8dad8411d92d9992db"}, - {file = "coverage-7.6.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4f704f0998911abf728a7783799444fcbbe8261c4a6c166f667937ae6a8aa522"}, - {file = "coverage-7.6.4-cp311-cp311-win32.whl", hash = "sha256:29155cd511ee058e260db648b6182c419422a0d2e9a4fa44501898cf918866cf"}, - {file = "coverage-7.6.4-cp311-cp311-win_amd64.whl", hash = "sha256:8902dd6a30173d4ef09954bfcb24b5d7b5190cf14a43170e386979651e09ba19"}, - {file = "coverage-7.6.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:12394842a3a8affa3ba62b0d4ab7e9e210c5e366fbac3e8b2a68636fb19892c2"}, - {file = "coverage-7.6.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2b6b4c83d8e8ea79f27ab80778c19bc037759aea298da4b56621f4474ffeb117"}, - {file = "coverage-7.6.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d5b8007f81b88696d06f7df0cb9af0d3b835fe0c8dbf489bad70b45f0e45613"}, - {file = "coverage-7.6.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b57b768feb866f44eeed9f46975f3d6406380275c5ddfe22f531a2bf187eda27"}, - {file = "coverage-7.6.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5915fcdec0e54ee229926868e9b08586376cae1f5faa9bbaf8faf3561b393d52"}, - {file = "coverage-7.6.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b58c672d14f16ed92a48db984612f5ce3836ae7d72cdd161001cc54512571f2"}, - {file = "coverage-7.6.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:2fdef0d83a2d08d69b1f2210a93c416d54e14d9eb398f6ab2f0a209433db19e1"}, - {file = "coverage-7.6.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8cf717ee42012be8c0cb205dbbf18ffa9003c4cbf4ad078db47b95e10748eec5"}, - {file = "coverage-7.6.4-cp312-cp312-win32.whl", hash = "sha256:7bb92c539a624cf86296dd0c68cd5cc286c9eef2d0c3b8b192b604ce9de20a17"}, - {file = "coverage-7.6.4-cp312-cp312-win_amd64.whl", hash = "sha256:1032e178b76a4e2b5b32e19d0fd0abbce4b58e77a1ca695820d10e491fa32b08"}, - {file = "coverage-7.6.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:023bf8ee3ec6d35af9c1c6ccc1d18fa69afa1cb29eaac57cb064dbb262a517f9"}, - {file = "coverage-7.6.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b0ac3d42cb51c4b12df9c5f0dd2f13a4f24f01943627120ec4d293c9181219ba"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8fe4984b431f8621ca53d9380901f62bfb54ff759a1348cd140490ada7b693c"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5fbd612f8a091954a0c8dd4c0b571b973487277d26476f8480bfa4b2a65b5d06"}, - {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacbc52de979f2823a819571f2e3a350a7e36b8cb7484cdb1e289bceaf35305f"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dab4d16dfef34b185032580e2f2f89253d302facba093d5fa9dbe04f569c4f4b"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:862264b12ebb65ad8d863d51f17758b1684560b66ab02770d4f0baf2ff75da21"}, - {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5beb1ee382ad32afe424097de57134175fea3faf847b9af002cc7895be4e2a5a"}, - {file = "coverage-7.6.4-cp313-cp313-win32.whl", hash = "sha256:bf20494da9653f6410213424f5f8ad0ed885e01f7e8e59811f572bdb20b8972e"}, - {file = "coverage-7.6.4-cp313-cp313-win_amd64.whl", hash = "sha256:182e6cd5c040cec0a1c8d415a87b67ed01193ed9ad458ee427741c7d8513d963"}, - {file = "coverage-7.6.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a181e99301a0ae128493a24cfe5cfb5b488c4e0bf2f8702091473d033494d04f"}, - {file = "coverage-7.6.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:df57bdbeffe694e7842092c5e2e0bc80fff7f43379d465f932ef36f027179806"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bcd1069e710600e8e4cf27f65c90c7843fa8edfb4520fb0ccb88894cad08b11"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99b41d18e6b2a48ba949418db48159d7a2e81c5cc290fc934b7d2380515bd0e3"}, - {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1e54712ba3474f34b7ef7a41e65bd9037ad47916ccb1cc78769bae324c01a"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53d202fd109416ce011578f321460795abfe10bb901b883cafd9b3ef851bacfc"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:c48167910a8f644671de9f2083a23630fbf7a1cb70ce939440cd3328e0919f70"}, - {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc8ff50b50ce532de2fa7a7daae9dd12f0a699bfcd47f20945364e5c31799fef"}, - {file = "coverage-7.6.4-cp313-cp313t-win32.whl", hash = "sha256:b8d3a03d9bfcaf5b0141d07a88456bb6a4c3ce55c080712fec8418ef3610230e"}, - {file = "coverage-7.6.4-cp313-cp313t-win_amd64.whl", hash = "sha256:f3ddf056d3ebcf6ce47bdaf56142af51bb7fad09e4af310241e9db7a3a8022e1"}, - {file = "coverage-7.6.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9cb7fa111d21a6b55cbf633039f7bc2749e74932e3aa7cb7333f675a58a58bf3"}, - {file = "coverage-7.6.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:11a223a14e91a4693d2d0755c7a043db43d96a7450b4f356d506c2562c48642c"}, - {file = "coverage-7.6.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a413a096c4cbac202433c850ee43fa326d2e871b24554da8327b01632673a076"}, - {file = "coverage-7.6.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00a1d69c112ff5149cabe60d2e2ee948752c975d95f1e1096742e6077affd376"}, - {file = "coverage-7.6.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f76846299ba5c54d12c91d776d9605ae33f8ae2b9d1d3c3703cf2db1a67f2c0"}, - {file = "coverage-7.6.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fe439416eb6380de434886b00c859304338f8b19f6f54811984f3420a2e03858"}, - {file = "coverage-7.6.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:0294ca37f1ba500667b1aef631e48d875ced93ad5e06fa665a3295bdd1d95111"}, - {file = "coverage-7.6.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6f01ba56b1c0e9d149f9ac85a2f999724895229eb36bd997b61e62999e9b0901"}, - {file = "coverage-7.6.4-cp39-cp39-win32.whl", hash = "sha256:bc66f0bf1d7730a17430a50163bb264ba9ded56739112368ba985ddaa9c3bd09"}, - {file = "coverage-7.6.4-cp39-cp39-win_amd64.whl", hash = "sha256:c481b47f6b5845064c65a7bc78bc0860e635a9b055af0df46fdf1c58cebf8e8f"}, - {file = "coverage-7.6.4-pp39.pp310-none-any.whl", hash = "sha256:3c65d37f3a9ebb703e710befdc489a38683a5b152242664b973a7b7b22348a4e"}, - {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"}, + {file = "coverage-7.6.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:108bb458827765d538abcbf8288599fee07d2743357bdd9b9dad456c287e121e"}, + {file = "coverage-7.6.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c973b2fe4dc445cb865ab369df7521df9c27bf40715c837a113edaa2aa9faf45"}, + {file = "coverage-7.6.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c6b24007c4bcd0b19fac25763a7cac5035c735ae017e9a349b927cfc88f31c1"}, + {file = "coverage-7.6.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:acbb8af78f8f91b3b51f58f288c0994ba63c646bc1a8a22ad072e4e7e0a49f1c"}, + {file = "coverage-7.6.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad32a981bcdedb8d2ace03b05e4fd8dace8901eec64a532b00b15217d3677dd2"}, + {file = "coverage-7.6.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:34d23e28ccb26236718a3a78ba72744212aa383141961dd6825f6595005c8b06"}, + {file = "coverage-7.6.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e25bacb53a8c7325e34d45dddd2f2fbae0dbc230d0e2642e264a64e17322a777"}, + {file = "coverage-7.6.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af05bbba896c4472a29408455fe31b3797b4d8648ed0a2ccac03e074a77e2314"}, + {file = "coverage-7.6.7-cp310-cp310-win32.whl", hash = "sha256:796c9b107d11d2d69e1849b2dfe41730134b526a49d3acb98ca02f4985eeff7a"}, + {file = "coverage-7.6.7-cp310-cp310-win_amd64.whl", hash = "sha256:987a8e3da7da4eed10a20491cf790589a8e5e07656b6dc22d3814c4d88faf163"}, + {file = "coverage-7.6.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7e61b0e77ff4dddebb35a0e8bb5a68bf0f8b872407d8d9f0c726b65dfabe2469"}, + {file = "coverage-7.6.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1a5407a75ca4abc20d6252efeb238377a71ce7bda849c26c7a9bece8680a5d99"}, + {file = "coverage-7.6.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df002e59f2d29e889c37abd0b9ee0d0e6e38c24f5f55d71ff0e09e3412a340ec"}, + {file = "coverage-7.6.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:673184b3156cba06154825f25af33baa2671ddae6343f23175764e65a8c4c30b"}, + {file = "coverage-7.6.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e69ad502f1a2243f739f5bd60565d14a278be58be4c137d90799f2c263e7049a"}, + {file = "coverage-7.6.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:60dcf7605c50ea72a14490d0756daffef77a5be15ed1b9fea468b1c7bda1bc3b"}, + {file = "coverage-7.6.7-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:9c2eb378bebb2c8f65befcb5147877fc1c9fbc640fc0aad3add759b5df79d55d"}, + {file = "coverage-7.6.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3c0317288f032221d35fa4cbc35d9f4923ff0dfd176c79c9b356e8ef8ef2dff4"}, + {file = "coverage-7.6.7-cp311-cp311-win32.whl", hash = "sha256:951aade8297358f3618a6e0660dc74f6b52233c42089d28525749fc8267dccd2"}, + {file = "coverage-7.6.7-cp311-cp311-win_amd64.whl", hash = "sha256:5e444b8e88339a2a67ce07d41faabb1d60d1004820cee5a2c2b54e2d8e429a0f"}, + {file = "coverage-7.6.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f07ff574986bc3edb80e2c36391678a271d555f91fd1d332a1e0f4b5ea4b6ea9"}, + {file = "coverage-7.6.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:49ed5ee4109258973630c1f9d099c7e72c5c36605029f3a91fe9982c6076c82b"}, + {file = "coverage-7.6.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3e8796434a8106b3ac025fd15417315d7a58ee3e600ad4dbcfddc3f4b14342c"}, + {file = "coverage-7.6.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3b925300484a3294d1c70f6b2b810d6526f2929de954e5b6be2bf8caa1f12c1"}, + {file = "coverage-7.6.7-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c42ec2c522e3ddd683dec5cdce8e62817afb648caedad9da725001fa530d354"}, + {file = "coverage-7.6.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0266b62cbea568bd5e93a4da364d05de422110cbed5056d69339bd5af5685433"}, + {file = "coverage-7.6.7-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e5f2a0f161d126ccc7038f1f3029184dbdf8f018230af17ef6fd6a707a5b881f"}, + {file = "coverage-7.6.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c132b5a22821f9b143f87446805e13580b67c670a548b96da945a8f6b4f2efbb"}, + {file = "coverage-7.6.7-cp312-cp312-win32.whl", hash = "sha256:7c07de0d2a110f02af30883cd7dddbe704887617d5c27cf373362667445a4c76"}, + {file = "coverage-7.6.7-cp312-cp312-win_amd64.whl", hash = "sha256:fd49c01e5057a451c30c9b892948976f5d38f2cbd04dc556a82743ba8e27ed8c"}, + {file = "coverage-7.6.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:46f21663e358beae6b368429ffadf14ed0a329996248a847a4322fb2e35d64d3"}, + {file = "coverage-7.6.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:40cca284c7c310d622a1677f105e8507441d1bb7c226f41978ba7c86979609ab"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77256ad2345c29fe59ae861aa11cfc74579c88d4e8dbf121cbe46b8e32aec808"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87ea64b9fa52bf395272e54020537990a28078478167ade6c61da7ac04dc14bc"}, + {file = "coverage-7.6.7-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d608a7808793e3615e54e9267519351c3ae204a6d85764d8337bd95993581a8"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdd94501d65adc5c24f8a1a0eda110452ba62b3f4aeaba01e021c1ed9cb8f34a"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:82c809a62e953867cf57e0548c2b8464207f5f3a6ff0e1e961683e79b89f2c55"}, + {file = "coverage-7.6.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bb684694e99d0b791a43e9fc0fa58efc15ec357ac48d25b619f207c41f2fd384"}, + {file = "coverage-7.6.7-cp313-cp313-win32.whl", hash = "sha256:963e4a08cbb0af6623e61492c0ec4c0ec5c5cf74db5f6564f98248d27ee57d30"}, + {file = "coverage-7.6.7-cp313-cp313-win_amd64.whl", hash = "sha256:14045b8bfd5909196a90da145a37f9d335a5d988a83db34e80f41e965fb7cb42"}, + {file = "coverage-7.6.7-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:f2c7a045eef561e9544359a0bf5784b44e55cefc7261a20e730baa9220c83413"}, + {file = "coverage-7.6.7-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5dd4e4a49d9c72a38d18d641135d2fb0bdf7b726ca60a103836b3d00a1182acd"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c95e0fa3d1547cb6f021ab72f5c23402da2358beec0a8e6d19a368bd7b0fb37"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f63e21ed474edd23f7501f89b53280014436e383a14b9bd77a648366c81dce7b"}, + {file = "coverage-7.6.7-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ead9b9605c54d15be228687552916c89c9683c215370c4a44f1f217d2adcc34d"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0573f5cbf39114270842d01872952d301027d2d6e2d84013f30966313cadb529"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:e2c8e3384c12dfa19fa9a52f23eb091a8fad93b5b81a41b14c17c78e23dd1d8b"}, + {file = "coverage-7.6.7-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:70a56a2ec1869e6e9fa69ef6b76b1a8a7ef709972b9cc473f9ce9d26b5997ce3"}, + {file = "coverage-7.6.7-cp313-cp313t-win32.whl", hash = "sha256:dbba8210f5067398b2c4d96b4e64d8fb943644d5eb70be0d989067c8ca40c0f8"}, + {file = "coverage-7.6.7-cp313-cp313t-win_amd64.whl", hash = "sha256:dfd14bcae0c94004baba5184d1c935ae0d1231b8409eb6c103a5fd75e8ecdc56"}, + {file = "coverage-7.6.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37a15573f988b67f7348916077c6d8ad43adb75e478d0910957394df397d2874"}, + {file = "coverage-7.6.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b6cce5c76985f81da3769c52203ee94722cd5d5889731cd70d31fee939b74bf0"}, + {file = "coverage-7.6.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ab9763d291a17b527ac6fd11d1a9a9c358280adb320e9c2672a97af346ac2c"}, + {file = "coverage-7.6.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6cf96ceaa275f071f1bea3067f8fd43bec184a25a962c754024c973af871e1b7"}, + {file = "coverage-7.6.7-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aee9cf6b0134d6f932d219ce253ef0e624f4fa588ee64830fcba193269e4daa3"}, + {file = "coverage-7.6.7-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2bc3e45c16564cc72de09e37413262b9f99167803e5e48c6156bccdfb22c8327"}, + {file = "coverage-7.6.7-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:623e6965dcf4e28a3debaa6fcf4b99ee06d27218f46d43befe4db1c70841551c"}, + {file = "coverage-7.6.7-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:850cfd2d6fc26f8346f422920ac204e1d28814e32e3a58c19c91980fa74d8289"}, + {file = "coverage-7.6.7-cp39-cp39-win32.whl", hash = "sha256:c296263093f099da4f51b3dff1eff5d4959b527d4f2f419e16508c5da9e15e8c"}, + {file = "coverage-7.6.7-cp39-cp39-win_amd64.whl", hash = "sha256:90746521206c88bdb305a4bf3342b1b7316ab80f804d40c536fc7d329301ee13"}, + {file = "coverage-7.6.7-pp39.pp310-none-any.whl", hash = "sha256:0ddcb70b3a3a57581b450571b31cb774f23eb9519c2aaa6176d3a84c9fc57671"}, + {file = "coverage-7.6.7.tar.gz", hash = "sha256:d79d4826e41441c9a118ff045e4bccb9fdbdcb1d02413e7ea6eb5c87b5439d24"}, ] [package.extras] @@ -836,109 +836,6 @@ completion = ["shtab (>=1.1.0)"] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] -[[package]] -name = "libvalkey" -version = "4.0.0" -description = "Python wrapper for libvalkey" -optional = true -python-versions = ">=3.8" -files = [ - {file = "libvalkey-4.0.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:97dbc5018adc0960b7f59c2bbb7234fd430e94c8d23ce3acd71fa0b28228dd98"}, - {file = "libvalkey-4.0.0-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:8818191a053b6d1f34c4be24091208fe5b2d0739b266ce391aff1fc4a79eb82e"}, - {file = "libvalkey-4.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f0a71903033c7020723ba7b6be2bee19da21f295a0664976000dc6070fbf9af"}, - {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:463d464e754b5c465eb2d8ce1d109b55081953377955df87fade661921033cdb"}, - {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c37b217cdcc7f9045cbdb57d5b7a29f2df8087b055f8333e0fa857f4d6d483a"}, - {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d36f518e1863ef877d6889c22987af877567eecb847e18646b2c28ab8d5501f8"}, - {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8024424df89d83fb6ed8048288db870aac41b56b229373a8c559a335e5eec5aa"}, - {file = "libvalkey-4.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7dc7977e1eca4c3a0db9032f504b5b95251fef13d3a4123913b4ffd52979ea27"}, - {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1cd48c0fbb1f3a5103d0352a367018488cea7e438616ce573624e4b0c4d585ff"}, - {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:57eb009c2b7d6fe262c897638fe1a90d8bd83a2ac5ec24e6bcb967dea7f048ef"}, - {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:b835c70ad0d0c132e08f7b503fbfa064b113362fafa99977a59ce63becb5aa15"}, - {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:a4fe1000ad3498f01ab3049488ab079fb57c9aec301f42d4110dd3dda525ee60"}, - {file = "libvalkey-4.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:453a3ec883c8b3c31cd86b525a230cfece4c665683badd27de4ef4294e790bf5"}, - {file = "libvalkey-4.0.0-cp310-cp310-win32.whl", hash = "sha256:54dda435d9782f51cb9feefa4c1b6d75a0cd323f0360d8ca6b590c2cec852422"}, - {file = "libvalkey-4.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:aab44979b80888510c7208a0a5b607db38da66aa3cc3cbdca2e75b19d1ae2294"}, - {file = "libvalkey-4.0.0-cp311-cp311-macosx_10_15_universal2.whl", hash = "sha256:16ee32ba10cb07a5c181e9ab14dd6e06abf4bcb1fe38c71280d97e7a25df85b6"}, - {file = "libvalkey-4.0.0-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:bb6e3e92d640a2b366de44024c5063edf9f1f8b7d22892d1fd7fad1da165ce9e"}, - {file = "libvalkey-4.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2b7fca5cc5fec2739054e591fd25fab48128250950018981d63dba1328e165f1"}, - {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7457e57a7d618e96e63dac8f2268999b8817d33e9e76f1b409ce552ae71b7e2b"}, - {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa16938031b16c2deb5d03617346f966f404f754b13e9fd730f4e9d808b98213"}, - {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:69eeb03ddd89fb99fbba4085ad4be74b43b921924b7fca9dff9ef343454d0a98"}, - {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e22dad7042d090109892b97d41bf51d4ad81be2db2292c3f45ed30686786d604"}, - {file = "libvalkey-4.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:926fe72263924065485ce516f94cb409e93c86351c10743298e44cdfe1bfd7c0"}, - {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4d60a1eb6ae18fb5b06db55d40eb181ce83a9f92735ded6457fda790c716a998"}, - {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:078b00cb30a7a9f5fc93b8f01103eb5d099b7c6d1a2fc7a59bb01e68f29c3684"}, - {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f2e16738c756cbf07eee0c3807984cb363873e78d8aef15e47e15153804bdf4c"}, - {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:16b02b974dd8520551a4bdf0f66e31262d2f44e894ef04f640c8c59b380a0586"}, - {file = "libvalkey-4.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7bc0d7a26d3b1fb0ecc1cd0b935c97017da8f5e9a36b2a108d8fed0fa463c143"}, - {file = "libvalkey-4.0.0-cp311-cp311-win32.whl", hash = "sha256:73cad7eda136f8163fae0d3994f5bde8e9225a77e2de85a546a8ddca188ac925"}, - {file = "libvalkey-4.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:0975ceb9440eddd9590f6400a7c32b109f9e45cd48b6d8276bafbbb7cddf4ec3"}, - {file = "libvalkey-4.0.0-cp312-cp312-macosx_10_15_universal2.whl", hash = "sha256:1c6cadc12cc0197d7a7d6fc8cc321f921b5d87ec218a39839a76c0b284476708"}, - {file = "libvalkey-4.0.0-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:291d40d277e2d3190955d3b642ec12be8bf9fe160dffa032b83c2b4f1ce71356"}, - {file = "libvalkey-4.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f2c3fe73a1ba6d9b21cada86156873d161cdd09b69c11aad39d80e45560c447a"}, - {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c64ba99ff2084d1b7e90f2fcb891e40848e3f39aa5868bff0dfe1f3f83bbaab2"}, - {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:430a9c2d834a1be2ba6dc9d5391baaffb5353860315148cd222138b1480baaf9"}, - {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d11db361d5673659efc4fc3728f92604d8b83de467e377e4da379bec6a5edf7"}, - {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9d15ff24f8ef73ab1fa2e608ddc4babfbb68044cbd8e13a6052e8ccbda6adec3"}, - {file = "libvalkey-4.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a43210584746dcccd595920393b41a7e48a30f021b521414d51fd31c0584248b"}, - {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:59fce74dcc7eab247b57e1db890a44388aa7722a5b19a3db1932aa96d1cd8d0f"}, - {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c32f0ca032b6727e2c0b0a8cd0c4590912ab452c61e298f871eff6f660eb1fc9"}, - {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:967e22774141da1c92a8a646d8e7024a02670ec94d604f34106f263fe0082188"}, - {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:72d1ddfe848b7ec2d4c615316e2b120e0e8a52ded3546b0b5b547d5431fe2ba1"}, - {file = "libvalkey-4.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:aa334ff652090e6c07d2c3a89320d71479f30efc538c61971b959b1e0267562b"}, - {file = "libvalkey-4.0.0-cp312-cp312-win32.whl", hash = "sha256:3db84d01d84ca0d3b98a6f88b2ecbfbd1952a03e91c97b13f1e0a138124832a1"}, - {file = "libvalkey-4.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:9e2aba07c0f7a37432c135f664cae413d31ed00321440c8ac0fed68464f9f420"}, - {file = "libvalkey-4.0.0-cp38-cp38-macosx_10_15_universal2.whl", hash = "sha256:faa02bb28e478c2623fe26815d7b5d2a7ad68e9fcf3e4466a07777f4d17f6ce0"}, - {file = "libvalkey-4.0.0-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d536178df1596c35ac32bcd7836d300f4bc68dc1582ffac8027558442637c0f9"}, - {file = "libvalkey-4.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c3a5d8776de930aa6eca1f835d9cd6cb35f0ea0821943d52022f2b75c1f0dbf"}, - {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:911b7542c2d33b97e276500f99bb608e112341e41d7922331c11b3e12a77885c"}, - {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca394e737edae7c82ff851f1fa429b9eee11c4fc2cee6336271b318be0afe1f2"}, - {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9593e27881e2b848ba81ff546be289af814093a492c4bbb6f837b701d22b802f"}, - {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7465dca91e916a9afb94a356bb37750a3715d53de466d30ba9eafaae1b4b4716"}, - {file = "libvalkey-4.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a000914e330559c714b048d53049eb7fe49e556b703a90d037ecc98ff11e6f9b"}, - {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:5ace17dd14382d1d7286294481f23244e45b8781435aee879f0c0cda8974bf5d"}, - {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:834bc422727cfb05fe6a360a865751c287e881d32a4b90588ded3b698a6e5eec"}, - {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:735dc00127d9fda43c8d82b929b165172313adb025f4c44c2391a295760b0194"}, - {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:0025a7cd55afd9421738ee08919788b0f04c60c89a25a8d80d29bce3edea17c9"}, - {file = "libvalkey-4.0.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:8afffad6e2b9938ea68bcf7a0db53ed288f4c15fe8bd0b7342bd1c3893de9dd7"}, - {file = "libvalkey-4.0.0-cp38-cp38-win32.whl", hash = "sha256:19ab19e7f387931bb5b974b29959946f01e64122e78706ef4066b38d1cec734f"}, - {file = "libvalkey-4.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:12f531e13ff901f6cd9fd431977ebbc86e6779dfcb6a52988deafef8774f6b47"}, - {file = "libvalkey-4.0.0-cp39-cp39-macosx_10_15_universal2.whl", hash = "sha256:a30332e7be16c1043238880135d064f14b8ec30c4e5e7a934d9a4667c14dac15"}, - {file = "libvalkey-4.0.0-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:359f223c24dfe2e2872f256fe276c3e11842ea04d77e0df1326a0c308632c6d2"}, - {file = "libvalkey-4.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b629751f4b23f539eabb6060c30f23274c890bb9408a7c674eb9d8b9320dc4b9"}, - {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae9517fef93613b5189fac8849ade4381658ea452774e7a8e9c7ddbf2c5ae57f"}, - {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bed1bb33404ca1e225a9557fa438336a25bfd9d94f2dba641c4b8612af19cc2b"}, - {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfd59af8b9142ec22de34f9ff0fb68afcaa8d37f7021bdb935c8fa5d686cd14c"}, - {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8785e9fafb7825fad92e5585aaab615678da84561963e1f0f111bbdc3fbb170"}, - {file = "libvalkey-4.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0dff4f2b1872ab9fe3aaade5fe329238ac54726c7de771c86882838ac9c25334"}, - {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5468fdbe7c478e433a3fd43a0636f6e80a5eb8067fa2ba351396f4ad94d300c0"}, - {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:8aea128b12b40afbff59a271bd130a49d8b251e0262047dc933e2098b229a1bf"}, - {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:8702c9dc4f5fe1f017ca02cfaae86df9be571b41c8707cd316156b301c399865"}, - {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:647623029d92b407688a9c964bc7ca18e27ef0757f662a0e175a0034fdaeaa07"}, - {file = "libvalkey-4.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:4105120b87ba66f5d95cadfdbd26c9d372df3cd78177e28d9451c151a3f20613"}, - {file = "libvalkey-4.0.0-cp39-cp39-win32.whl", hash = "sha256:f49b8174cfad6858f0725d9967d7016af851f6b54beb8e1bc2276728e343f631"}, - {file = "libvalkey-4.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:d381de880b8dbd739a0f3d76d7fbf9d75b244d81e4cdd11880a7128cf7c40301"}, - {file = "libvalkey-4.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0cfec0c9d6d89fdec9467b6fe29430b8f3d36189c4187e3db196860b67e4161c"}, - {file = "libvalkey-4.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:537a6ad812458200d19988789a9e8d75f14d20d1decaf0139286f1cc5258959a"}, - {file = "libvalkey-4.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:832430c53715f16afb2dd2f5ebeaf2e81b3014cd19f587180a470743096c8fc6"}, - {file = "libvalkey-4.0.0-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8fb034377dffac04e085d881cfe3aa41d698ed3400cc2f1f8f982cf9863f92cf"}, - {file = "libvalkey-4.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3638702abc549bd560c574a9c7f8336980323538498838846b64ad89bb24e513"}, - {file = "libvalkey-4.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:3e880632226ce5192f472a6c427bb560020b4e0cf609fd92504ee89a566d2983"}, - {file = "libvalkey-4.0.0-pp38-pypy38_pp73-macosx_10_15_x86_64.whl", hash = "sha256:22f9b5fdd2fa52d9f3e3d581794b8e44692de469f181b7549c96571465b1feab"}, - {file = "libvalkey-4.0.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:6a04d0fe63850c95e1a847043f93825a1d9b04537cf5bde2d12c548acdda17bb"}, - {file = "libvalkey-4.0.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51c774997fbd5f16ad6e196d1449cb3eaee171f847148bc2aeb6e52f50134ac9"}, - {file = "libvalkey-4.0.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:92d05d88a1926d2bca72a7cfd55b90f2b2e49c19ba5d4f06620c8e32a312c4fa"}, - {file = "libvalkey-4.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90b6743ddaf96365600bf0df2d928584958e0ac7fac85404dbceedb165992a68"}, - {file = "libvalkey-4.0.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4fc803e8d94ef3bbe09d55f81641e0eff35b35519914501973e00d5e549ac976"}, - {file = "libvalkey-4.0.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e001e72c47e8bc29e18d15f22e4ef3b9d2e52928e9d23471ba9502b0ce67c0d0"}, - {file = "libvalkey-4.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:19a56359350b76a564bd5acf820bcda84d447e3269f316352c5f77c97c7be905"}, - {file = "libvalkey-4.0.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65d89f152490086d2145acf79a7b3049aa75ed6e49022e2cb924f04ec404ec6f"}, - {file = "libvalkey-4.0.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b26e2af0b4a36feef67660860ad347a1aa56f85c5bcdb691158aa8999878e9bc"}, - {file = "libvalkey-4.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2d7d17779f099abcdb7a1874c42bb8089231c54a44386643878af11271b73c3"}, - {file = "libvalkey-4.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f911f95b55144c1c021846c1e62ee9495291d028da39fd33470a7db8c330843a"}, - {file = "libvalkey-4.0.0.tar.gz", hash = "sha256:b69354798f115f25e4fdccf0b9045baa429a1d55c5c3b653dc3ef2c9e3762807"}, -] - [[package]] name = "lupa" version = "2.2" @@ -1856,10 +1753,9 @@ type = ["pytest-mypy"] [extras] valkey = ["valkey"] -valkey-full = ["libvalkey", "valkey"] yaml = ["pyyaml"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "326a461ad7042b3389a0ae92d460be1b7e206b43511f7a9bc56d87245e9b6c2a" +content-hash = "d2f15d1a3c26092b506e3da3a2539fe9ca83c8e68c7949c64f71f8af3401b3cb" diff --git a/pyproject.toml b/pyproject.toml index f2f99cd..2236d88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,6 @@ click = "^8.1" rq = "^1.16" pyyaml = { version = "^6.0", optional = true } valkey = { version = "^6.0.2", optional = true} -libvalkey = { version = "^4.0.0", optional = true} [tool.poetry.dev-dependencies] poetry = "^1.8.3" @@ -62,7 +61,6 @@ freezegun = "^1.5" [tool.poetry.extras] yaml = ["pyyaml"] valkey = ["valkey"] -valkey_full = ["valkey","libvalkey"] [tool.flake8] max-line-length = 120 From e170e3c9fce755a38937ec632870a62331a61355 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Sat, 16 Nov 2024 09:51:31 -0500 Subject: [PATCH 7/8] BrokerMetaData --- scheduler/admin/task_models.py | 5 ++- scheduler/broker_types.py | 26 ++++++++++++++++ scheduler/connection_types.py | 24 --------------- scheduler/management/commands/rqworker.py | 5 ++- scheduler/queues.py | 37 +++++------------------ scheduler/rq_classes.py | 2 +- scheduler/views.py | 15 ++------- 7 files changed, 41 insertions(+), 73 deletions(-) create mode 100644 scheduler/broker_types.py delete mode 100644 scheduler/connection_types.py diff --git a/scheduler/admin/task_models.py b/scheduler/admin/task_models.py index 639765a..ca3d8db 100644 --- a/scheduler/admin/task_models.py +++ b/scheduler/admin/task_models.py @@ -1,10 +1,9 @@ -import redis -import valkey from django.contrib import admin, messages from django.contrib.contenttypes.admin import GenericStackedInline from django.utils.translation import gettext_lazy as _ from scheduler import tools +from scheduler.broker_types import ConnectionErrorTypes from scheduler.models import CronTask, TaskArg, TaskKwarg, RepeatableTask, ScheduledTask from scheduler.settings import SCHEDULER_CONFIG, logger from scheduler.tools import get_job_executions_for_task @@ -186,7 +185,7 @@ def change_view(self, request, object_id, form_url="", extra_context=None): obj = self.get_object(request, object_id) try: execution_list = get_job_executions_for_task(obj.queue, obj) - except (redis.ConnectionError, valkey.ConnectionError) as e: + except ConnectionErrorTypes as e: logger.warn(f"Could not get job executions: {e}") execution_list = list() paginator = self.get_paginator(request, execution_list, SCHEDULER_CONFIG.EXECUTIONS_IN_PAGE) diff --git a/scheduler/broker_types.py b/scheduler/broker_types.py new file mode 100644 index 0000000..80a1a4b --- /dev/null +++ b/scheduler/broker_types.py @@ -0,0 +1,26 @@ +from typing import Union, Dict, Tuple, Type + +import redis + +try: + import valkey +except ImportError: + valkey = redis + valkey.Valkey = redis.Redis + valkey.StrictValkey = redis.StrictRedis + +from scheduler.settings import Broker + +ConnectionErrorTypes = (redis.ConnectionError, valkey.ConnectionError) +ResponseErrorTypes = (redis.ResponseError, valkey.ResponseError) +ConnectionType = Union[redis.Redis, valkey.Valkey] +PipelineType = Union[redis.client.Pipeline, valkey.client.Pipeline] +SentinelType = Union[redis.sentinel.Sentinel, valkey.sentinel.Sentinel] + +BrokerMetaData: Dict[Tuple[Broker, bool], Tuple[Type[ConnectionType], Type[SentinelType], str]] = { + # Map of (Broker, Strict flag) => Connection Class, Sentinel Class, SSL Connection Prefix + (Broker.REDIS, False): (redis.Redis, redis.sentinel.Sentinel, "rediss"), + (Broker.VALKEY, False): (valkey.Valkey, valkey.sentinel.Sentinel, "valkeys"), + (Broker.REDIS, True): (redis.StrictRedis, redis.sentinel.Sentinel, "rediss"), + (Broker.VALKEY, True): (valkey.StrictValkey, valkey.sentinel.Sentinel, "valkeys"), +} diff --git a/scheduler/connection_types.py b/scheduler/connection_types.py deleted file mode 100644 index 3b8c61a..0000000 --- a/scheduler/connection_types.py +++ /dev/null @@ -1,24 +0,0 @@ -from typing import Union, Dict, Tuple, Type - -import redis -try: - import valkey -except ImportError: - valkey = redis - valkey.Valkey = redis.Redis - -from scheduler.settings import Broker - -ConnectionErrorType = Union[redis.ConnectionError, valkey.ConnectionError] -ConnectionType = Union[redis.Redis, valkey.Valkey] -PipelineType = Union[redis.client.Pipeline, valkey.client.Pipeline] -RedisSentinel = redis.sentinel.Sentinel -ValkeySentinel = valkey.sentinel.Sentinel - -BrokerConnectionClass: Dict[Tuple[Broker, bool], Type] = { - # Map of (Broker, Strict flag) => Connection Class - (Broker.REDIS, False): redis.Redis, - (Broker.VALKEY, False): valkey.Valkey, - (Broker.REDIS, True): redis.StrictRedis, - (Broker.VALKEY, True): valkey.StrictValkey, -} diff --git a/scheduler/management/commands/rqworker.py b/scheduler/management/commands/rqworker.py index 99f0573..4ca5713 100644 --- a/scheduler/management/commands/rqworker.py +++ b/scheduler/management/commands/rqworker.py @@ -3,12 +3,11 @@ import sys import click -import redis -import valkey from django.core.management.base import BaseCommand from django.db import connections from rq.logutils import setup_loghandlers +from scheduler.broker_types import ConnectionErrorTypes from scheduler.rq_classes import register_sentry from scheduler.tools import create_worker @@ -136,6 +135,6 @@ def handle(self, **options): logging_level=log_level, max_jobs=options["max_jobs"], ) - except (redis.ConnectionError, valkey.ConnectionError) as e: + except ConnectionErrorTypes as e: click.echo(str(e), err=True) sys.exit(1) diff --git a/scheduler/queues.py b/scheduler/queues.py index 21b6303..401b4ec 100644 --- a/scheduler/queues.py +++ b/scheduler/queues.py @@ -1,21 +1,10 @@ from typing import List, Dict, Set -import redis - -from .connection_types import RedisSentinel, ValkeySentinel, BrokerConnectionClass +from .broker_types import ConnectionErrorTypes, BrokerMetaData from .rq_classes import JobExecution, DjangoQueue, DjangoWorker from .settings import SCHEDULER_CONFIG from .settings import logger, Broker - -try: - from valkey import exceptions -except ImportError: - exceptions = "" - exceptions.ConnectionError = redis.ConnectionError - -ConnectionErrors = (redis.ConnectionError, exceptions.ConnectionError) - _CONNECTION_PARAMS = { "URL", "DB", @@ -36,18 +25,6 @@ class QueueNotFoundError(Exception): pass -ssl_url_protocol = { - "valkey": "valkeys", - "redis": "rediss", - "fakeredis": "rediss" -} - -sentinel_broker = { - "valkey": ValkeySentinel, - "redis": RedisSentinel, -} - - def _get_broker_connection(config, use_strict_broker=False): """ Returns a redis connection from a connection config @@ -57,10 +34,11 @@ def _get_broker_connection(config, use_strict_broker=False): broker_cls = fakeredis.FakeRedis if not use_strict_broker else fakeredis.FakeStrictRedis else: - broker_cls = BrokerConnectionClass[(SCHEDULER_CONFIG.BROKER, use_strict_broker)] + broker_cls = BrokerMetaData[(SCHEDULER_CONFIG.BROKER, use_strict_broker)][0] logger.debug(f"Getting connection for {config}") if "URL" in config: - if config.get("SSL") or config.get("URL").startswith(f"{ssl_url_protocol[SCHEDULER_CONFIG.BROKER.value]}://"): + ssl_url_protocol = BrokerMetaData[(SCHEDULER_CONFIG.BROKER, use_strict_broker)][2] + if config.get("SSL") or config.get("URL").startswith(f"{ssl_url_protocol}://"): return broker_cls.from_url( config["URL"], db=config.get("DB"), @@ -83,9 +61,8 @@ def _get_broker_connection(config, use_strict_broker=False): } connection_kwargs.update(config.get("CONNECTION_KWARGS", {})) sentinel_kwargs = config.get("SENTINEL_KWARGS", {}) - sentinel = sentinel_broker[SCHEDULER_CONFIG.BROKER.value]( - config["SENTINELS"], sentinel_kwargs=sentinel_kwargs, **connection_kwargs - ) + SentinelClass = BrokerMetaData[(SCHEDULER_CONFIG.BROKER, use_strict_broker)][1] + sentinel = SentinelClass(config["SENTINELS"], sentinel_kwargs=sentinel_kwargs, **connection_kwargs) return sentinel.master_for( service_name=config["MASTER_NAME"], redis_class=broker_cls, @@ -138,7 +115,7 @@ def get_all_workers() -> Set[DjangoWorker]: try: curr_workers: Set[DjangoWorker] = set(DjangoWorker.all(connection=connection)) workers_set.update(curr_workers) - except ConnectionErrors as e: + except ConnectionErrorTypes as e: logger.error(f"Could not connect for queue {queue_name}: {e}") return workers_set diff --git a/scheduler/rq_classes.py b/scheduler/rq_classes.py index 1a91c48..1a14368 100644 --- a/scheduler/rq_classes.py +++ b/scheduler/rq_classes.py @@ -22,7 +22,7 @@ from rq.worker import WorkerStatus from scheduler import settings -from scheduler.connection_types import PipelineType, ConnectionType +from scheduler.broker_types import PipelineType, ConnectionType MODEL_NAMES = ["ScheduledTask", "RepeatableTask", "CronTask"] diff --git a/scheduler/views.py b/scheduler/views.py index b0c5621..89c94c5 100644 --- a/scheduler/views.py +++ b/scheduler/views.py @@ -13,22 +13,13 @@ from django.views.decorators.cache import never_cache from redis.exceptions import ResponseError - -from .queues import get_all_workers, get_connection, QueueNotFoundError, ConnectionErrors +from .broker_types import ConnectionErrorTypes +from .queues import get_all_workers, get_connection, QueueNotFoundError from .queues import get_queue as get_queue_base from .rq_classes import JobExecution, DjangoWorker, DjangoQueue, InvalidJobOperation from .settings import SCHEDULER_CONFIG, logger -try: - from valkey import exceptions -except ImportError: - exceptions = "" - exceptions.ResponseError = ResponseError - -ResponseErrors = (ResponseError, exceptions.ResponseError) - - def get_queue(queue_name: str) -> DjangoQueue: try: return get_queue_base(queue_name) @@ -111,7 +102,7 @@ def get_statistics(run_maintenance_tasks=False): canceled_jobs=len(queue.canceled_job_registry), ) queues.append(queue_data) - except ConnectionErrors as e: + except ConnectionErrorTypes as e: logger.error(f"Could not connect for queue {queue_name}: {e}") continue From 590e291bde599305247a1e750c39343f691dea18 Mon Sep 17 00:00:00 2001 From: Daniel M Date: Sat, 16 Nov 2024 09:53:17 -0500 Subject: [PATCH 8/8] BrokerMetaData --- scheduler/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scheduler/views.py b/scheduler/views.py index 89c94c5..3394764 100644 --- a/scheduler/views.py +++ b/scheduler/views.py @@ -11,9 +11,8 @@ from django.shortcuts import render from django.urls import reverse, resolve from django.views.decorators.cache import never_cache -from redis.exceptions import ResponseError -from .broker_types import ConnectionErrorTypes +from .broker_types import ConnectionErrorTypes, ResponseErrorTypes from .queues import get_all_workers, get_connection, QueueNotFoundError from .queues import get_queue as get_queue_base from .rq_classes import JobExecution, DjangoWorker, DjangoQueue, InvalidJobOperation @@ -277,7 +276,7 @@ def clear_queue_registry(request: HttpRequest, queue_name: str, registry_name: s for job_id in job_ids: registry.remove(job_id, delete_job=True) messages.info(request, f"You have successfully cleared the {registry_name} jobs in queue {queue.name}") - except ResponseErrors as e: + except ResponseErrorTypes as e: messages.error( request, f"error: {e}",