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

feat: replace python-memcached with pymemcache #2878

Merged
merged 2 commits into from
Feb 24, 2025
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
10 changes: 5 additions & 5 deletions check-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ def versiontuple(v):
required += 1


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

Expand Down Expand Up @@ -193,7 +193,7 @@ def versiontuple(v):
'pytz',
'pyparsing',
'tagging',
'memcache',
'pymemcache',
'ldap',
'txamqp',
'rrdtool',
Expand Down
6 changes: 3 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ is part of the Graphite project.

There are also several other dependencies required for additional features:

* Render caching: `memcached`_ and `python-memcache`_
* Render caching: `memcached`_ and `pymemcache`_
* LDAP authentication: `python-ldap`_ (for LDAP authentication support in the webapp)
* AMQP support: `txamqp`_ (version 0.8 is required)
* RRD support: `python-rrdtool`_
Expand Down Expand Up @@ -145,7 +145,7 @@ Initial Configuration

.. toctree::
:maxdepth: 2

config-database-setup
config-webapp
config-local-settings
Expand Down Expand Up @@ -204,7 +204,7 @@ Unfortunately, native Graphite on Windows is completely unsupported, but you can
.. _NOT Python 3: https://python3wos.appspot.com/
.. _pip: https://pip.pypa.io/
.. _python-ldap: https://www.python-ldap.org/
.. _python-memcache: https://www.tummy.com/software/python-memcached/
.. _pymemcache: https://github.com/pinterest/pymemcache
.. _python-rrdtool: http://oss.oetiker.ch/rrdtool/prog/rrdpython.en.html
.. _python-sqlite2: https://github.com/ghaering/pysqlite
.. _pytz: https://pypi.python.org/pypi/pytz/
Expand Down
2 changes: 1 addition & 1 deletion webapp/graphite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
# Caching shortcuts
if MEMCACHE_HOSTS:
CACHES['default'] = {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': MEMCACHE_HOSTS,
'TIMEOUT': DEFAULT_CACHE_DURATION,
'KEY_PREFIX': MEMCACHE_KEY_PREFIX,
Expand Down