15
0
forked from pool/python-Beaker
Files
python-Beaker/support-pymemcache.patch
Steve Kowalik 33605962fc - Switch to pyproject macros.
- Add patch avoid-dbm-sqlite3.patch:
  * Avoid dbm.sqlite3 to support testing with Python 3.13.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Beaker?expand=0&rev=65
2025-04-15 06:22:45 +00:00

27 lines
904 B
Diff

Index: beaker-1.12.0/beaker/ext/memcached.py
===================================================================
--- beaker-1.12.0.orig/beaker/ext/memcached.py
+++ beaker-1.12.0/beaker/ext/memcached.py
@@ -39,8 +39,12 @@ def _load_client(name='auto'):
import bmemcached
return bmemcached
+ def _pymemcache():
+ from pymemcache.client.base import Client
+ return Client
+
def _auto():
- for _client in (_pylibmc, _cmemcache, _memcache, _bmemcached):
+ for _client in (_pymemcache, _pylibmc, _cmemcache, _memcache, _bmemcached):
try:
return _client()
except ImportError:
@@ -52,6 +56,7 @@ def _load_client(name='auto'):
clients = {
'pylibmc': _pylibmc,
+ 'pymemcache': _pymemcache,
'cmemcache': _cmemcache,
'memcache': _memcache,
'bmemcached': _bmemcached,