Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support Python3.9 and Python3.10 #203

Merged
merged 15 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.10'
- name: Install Tox
run: pip install tox
- name: isort
Expand Down
4 changes: 2 additions & 2 deletions django_elastipymemcache/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from distutils.version import StrictVersion

from django.utils.encoding import smart_str
from packaging.version import parse
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distutil is deprecated in Python 3.12
pypa/packaging#520

from pymemcache.client.base import Client, _readline
from pymemcache.exceptions import MemcacheUnknownError

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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ coverage==6.4.4
flake8==5.0.4
isort==5.10.1
mock==4.0.3
nose==1.3.7
pymemcache==3.5.2
pytest==7.1.2
readme-renderer==37.0
Loading
Loading