Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9b445a0
Bump isort from 5.5.0 to 5.10.1
dependabot[bot] Nov 10, 2021
a9f23eb
Bump check-manifest from 0.42 to 0.48
dependabot[bot] Mar 14, 2022
b74ceb0
Replace smart_text to smart_str
heavenshell Aug 22, 2022
2a1e432
Replace warn to warning
heavenshell Aug 22, 2022
dfed7d1
Fix drop old python version, django and add new django version
heavenshell Aug 22, 2022
877dc43
Add flake8 section for local development
heavenshell Aug 22, 2022
de88808
Add GitHub action for CI
heavenshell Aug 22, 2022
147f593
Goodbye travis
heavenshell Aug 22, 2022
2b8484e
Add coverage
heavenshell Aug 22, 2022
492e3c2
Remove coverage
heavenshell Aug 22, 2022
1fdffe1
Merge pull request #202 from harikitech/topic/django4
heavenshell Aug 22, 2022
86737b7
Goodbye nose, hello pytest
heavenshell Aug 22, 2022
d25c95b
Replace nose to pytest
heavenshell Aug 22, 2022
0ad83f7
Fix flake8 errors
heavenshell Aug 22, 2022
b2c7921
Fix 3.8 to 3.10
heavenshell Aug 22, 2022
cff3db8
Add python3.9 and 3.10
heavenshell Aug 22, 2022
a85b3b6
Fix add quote
heavenshell Aug 22, 2022
abcd998
Merge pull request #187 from harikitech/dependabot/pip/check-manifest…
heavenshell Aug 23, 2022
37a69ab
Merge pull request #177 from harikitech/dependabot/pip/isort-5.10.1
heavenshell Aug 23, 2022
bebe8d8
Bump flake8 from 3.8.3 to 5.0.4
dependabot[bot] Aug 23, 2022
6f8c47c
Bump pymemcache from 3.3.0 to 3.5.2
dependabot[bot] Aug 23, 2022
a908181
Bump coverage from 5.2.1 to 6.4.4
dependabot[bot] Aug 23, 2022
653cb3e
Bump mock from 4.0.2 to 4.0.3
dependabot[bot] Aug 23, 2022
4fc298c
Merge pull request #147 from harikitech/dependabot/pip/mock-4.0.3
heavenshell Aug 23, 2022
05e29f9
Merge pull request #189 from harikitech/dependabot/pip/pymemcache-3.5.2
heavenshell Aug 23, 2022
8c9d756
Merge pull request #197 from harikitech/dependabot/pip/flake8-5.0.4
heavenshell Aug 23, 2022
0b132c3
Merge branch 'master' into dependabot/pip/coverage-6.4.4
heavenshell Aug 23, 2022
efdf70f
Merge pull request #200 from harikitech/dependabot/pip/coverage-6.4.4
heavenshell Aug 23, 2022
52fe428
Bump readme-renderer from 26.0 to 37.0
dependabot[bot] Aug 23, 2022
5ae6a0e
Merge pull request #201 from harikitech/dependabot/pip/readme-rendere…
heavenshell Aug 23, 2022
db40fc0
update tox settings
shkumagai Aug 23, 2022
6b42ff2
Merge pull request #204 from harikitech/chore/update-tox-settings
heavenshell Aug 23, 2022
018dbe4
Merge branch 'master' into topic/drop_nose
heavenshell Aug 24, 2022
9a5a5b0
apply mock to 'socket.getaddrinfo' method
shkumagai Aug 24, 2022
29801fa
apply mock to 'pymemcache.client.base.Client.set_many' method
shkumagai Aug 24, 2022
14f0092
Merge pull request #206 from harikitech/fix/failed-tests
heavenshell Aug 25, 2022
3161187
Fix replace packaging.version for distutils is deprecated
heavenshell Sep 23, 2024
2c01454
Fix isort error
heavenshell Sep 23, 2024
d9ac26a
Fix apply tox v4 syntax
heavenshell Sep 23, 2024
8605872
Bump version 2.0.5Bump version 2.0.5Bump version 2.0.5Bump version
heavenshell Sep 23, 2024
ea8df18
Merge pull request #203 from harikitech/topic/drop_nose
Surgo Sep 23, 2024
e4eba58
Merge pull request #231 from harikitech/topic/bump/2.0.5
Surgo Sep 23, 2024
c61edde
Merge remote-tracking branch 'upstream/master' into python312-django5…
yonijacobi Sep 14, 2025
7bbbfaf
fix indentation
yonijacobi Sep 14, 2025
88a2356
fix tests
yonijacobi Sep 14, 2025
db87dcf
change tests to 3.12
yonijacobi Sep 14, 2025
fa67686
fix tests
yonijacobi Sep 14, 2025
6cf1480
fix isort
yonijacobi Sep 14, 2025
eb09a48
install setup tools
yonijacobi Sep 14, 2025
8ca093f
updatee tox.ini
yonijacobi Sep 14, 2025
5dd8d4a
update tox.ini
yonijacobi Sep 14, 2025
1a11e92
fix flake
yonijacobi Sep 14, 2025
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
45 changes: 45 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build

on: [push, pull_request]

jobs:
build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
env:
COVERAGE_OPTIONS: "-a"

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Tox and any other packages
run: pip install tox tox-gh-actions
- name: Test with tox
run: tox

code_quality:
name: Code Quality
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install Tox
run: pip install tox
- name: isort
run: tox -e isort
- name: readme
run: tox -e readme
- name: flake8
run: tox -e flake8
- name: check-manifest
run: tox -e check-manifest
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion django_elastipymemcache/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = (2, 0, 4)
VERSION = (2, 0, 5)
__version__ = '.'.join(map(str, VERSION))
2 changes: 1 addition & 1 deletion django_elastipymemcache/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def client_servers(self):
socket.gaierror,
socket.timeout,
) as e:
logger.warn(
logger.warning(
'Cannot connect to cluster %s, err: %s',
self.configuration_endpoint_client.server,
e,
Expand Down
11 changes: 7 additions & 4 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
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 All @@ -26,7 +26,10 @@ def _extract_cluster_info(self, line):
nodes = []
for raw_node in raw_nodes.split(b' '):
host, ip, port = raw_node.split(b'|')
nodes.append((smart_str(ip or host), int(port)))
nodes.append('{host}:{port}'.format(
host=smart_str(ip or host),
port=int(port)
))
return {
'version': int(raw_version),
'nodes': nodes,
Expand Down Expand Up @@ -63,7 +66,7 @@ def get_cluster_info(self):
return self._fetch_cluster_info_cmd(cmd, 'config cluster')
except Exception as e:
if self.ignore_cluster_errors:
logger.warn('Failed to get cluster: %s', e)
logger.warning('Failed to get cluster: %s', e)
return {
'version': None,
'nodes': [(
Expand Down
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
check-manifest==0.42
coverage==5.2.1
flake8==3.8.3
isort==5.5.0
mock==4.0.2
nose==1.3.7
pymemcache==3.4.3
readme-renderer==26.0
check-manifest==0.48
coverage==6.4.4
flake8==5.0.4
isort==5.10.1
mock==4.0.3
pymemcache==3.5.2
pytest==7.1.2
readme-renderer==37.0
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,13 @@ ignore =
[coverage:run]
branch = True
omit = tests/*

[flake8]
exclude =
.git,
.tox,
.venv,
.eggs,
migrations,
venv,
__pycache__
Loading
Loading