From bec15b4d4e0ae8f9e1db1373170877dc2ca10875 Mon Sep 17 00:00:00 2001 From: Walter Boring Date: Mon, 12 May 2025 10:30:31 -0400 Subject: [PATCH] Migrate CRC16 to upstream fix this patch implements the required CRC package's migration for versions of crc > 7.0.0. The migration is discussed here: https://github.com/Nicoretti/crc/releases/tag/7.0.0 --- pyredis/helper.py | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyredis/helper.py b/pyredis/helper.py index c000eb2..e9f60f3 100644 --- a/pyredis/helper.py +++ b/pyredis/helper.py @@ -9,7 +9,7 @@ from pyredis.protocol import to_bytes -crc16 = crc.Calculator(crc.Crc16.CCITT) +crc16 = crc.Calculator(crc.Crc16.XMODEM) def dict_from_list(source): diff --git a/setup.py b/setup.py index 741a951..3e3a2e3 100644 --- a/setup.py +++ b/setup.py @@ -23,10 +23,10 @@ 'Programming Language :: Python :: 3' ], setup_requires=[ - 'crc' + 'crc>=7.0.0' ], install_requires=[ - 'crc' + 'crc>=7.0.0' ], keywords=[ 'redis'