Skip to content

Commit 50d8e87

Browse files
author
Lionel BILLORET
committed
feat: replace python-memcached (deprecated in django 4.x) with pymemcache
1 parent d125792 commit 50d8e87

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: check-dependencies.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ def versiontuple(v):
117117
required += 1
118118

119119

120-
# Test for python-memcached
120+
# Test for pymemcache
121121
try:
122-
import memcache
122+
import pymemcache
123123
except ImportError:
124-
sys.stderr.write("[OPTIONAL] Unable to import the 'memcache' module, "
125-
"do you have python-memcached installed for python %s? "
124+
sys.stderr.write("[OPTIONAL] Unable to import the 'pymemcache' module, "
125+
"do you have pymemcache installed for python %s? "
126126
"This feature is not required but greatly improves performance.\n" % sys.version_info.major)
127127
optional += 1
128128

@@ -193,7 +193,7 @@ def versiontuple(v):
193193
'pytz',
194194
'pyparsing',
195195
'tagging',
196-
'memcache',
196+
'pymemcache',
197197
'ldap',
198198
'txamqp',
199199
'rrdtool',

Diff for: docs/install.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Initial Configuration
145145

146146
.. toctree::
147147
:maxdepth: 2
148-
148+
149149
config-database-setup
150150
config-webapp
151151
config-local-settings
@@ -204,7 +204,7 @@ Unfortunately, native Graphite on Windows is completely unsupported, but you can
204204
.. _NOT Python 3: https://python3wos.appspot.com/
205205
.. _pip: https://pip.pypa.io/
206206
.. _python-ldap: https://www.python-ldap.org/
207-
.. _python-memcache: https://www.tummy.com/software/python-memcached/
207+
.. _pymemcache: https://github.com/pinterest/pymemcache
208208
.. _python-rrdtool: http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html
209209
.. _python-sqlite2: https://github.com/ghaering/pysqlite
210210
.. _pytz: https://pypi.python.org/pypi/pytz/

Diff for: webapp/graphite/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
# Caching shortcuts
324324
if MEMCACHE_HOSTS:
325325
CACHES['default'] = {
326-
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
326+
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
327327
'LOCATION': MEMCACHE_HOSTS,
328328
'TIMEOUT': DEFAULT_CACHE_DURATION,
329329
'KEY_PREFIX': MEMCACHE_KEY_PREFIX,

0 commit comments

Comments
 (0)