diff --git a/openstack_dashboard/local/local_settings.py.example b/openstack_dashboard/local/local_settings.py.example index ac54f6db0d..ade31c50a0 100644 --- a/openstack_dashboard/local/local_settings.py.example +++ b/openstack_dashboard/local/local_settings.py.example @@ -95,7 +95,7 @@ SECRET_KEY = secret_key.generate_or_read_from_file( # https://docs.djangoproject.com/en/1.11/topics/http/sessions/. #CACHES = { # 'default': { -# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', +# 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', # 'LOCATION': '127.0.0.1:11211', # }, #} diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index 23d52a50b7..0f7724eff2 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -172,7 +172,7 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' SESSION_ENGINE = 'django.contrib.sessions.backends.cache' CACHES = { 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', 'LOCATION': '127.0.0.1:11211', }, } diff --git a/releasenotes/notes/bug-2039225-39b7060a7e4bff07.yaml b/releasenotes/notes/bug-2039225-39b7060a7e4bff07.yaml new file mode 100644 index 0000000000..4fdecdea0e --- /dev/null +++ b/releasenotes/notes/bug-2039225-39b7060a7e4bff07.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Default cache backend has been changed from MemcachedCache backend to + PyMemcacheCache backend. MemcachedCache backend was deprecated in django + 3.2 and was later removed in django 4.1. Note that the LOCATION option + needs to be updated in case memcached servers use IPv6, so that inet6 + prefix is not included. diff --git a/test-requirements.txt b/test-requirements.txt index 77cf8727cf..803fa25faa 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,7 +12,7 @@ nodeenv>=0.9.4 # BSD pytest>=5.3.5 # MIT pytest-django>=3.8.0 # BSD (3 clause) pytest-html>=2.0.1 #MPL-2.0 -python-memcached>=1.59 # PSF +pymemcache>=4.0.0 # Apache 2.0 License selenium>=2.50.1 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT