Skip to content

Commit

Permalink
Fix replace packaging.version for distutils is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
heavenshell committed Sep 23, 2024
1 parent 14f0092 commit 3161187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_elastipymemcache/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from distutils.version import StrictVersion
from packaging.version import parse

from django.utils.encoding import smart_str
from pymemcache.client.base import Client, _readline
Expand All @@ -17,7 +17,7 @@ def __init__(self, *args, ignore_cluster_errors=False, **kwargs):
return client

def _get_cluster_info_cmd(self):
if StrictVersion(smart_str(self.version())) < StrictVersion('1.4.14'):
if parse(smart_str(self.version())) < parse('1.4.14'):
return b'get AmazonElastiCache:cluster\r\n'
return b'config get cluster\r\n'

Expand Down

0 comments on commit 3161187

Please sign in to comment.