forked from pool/python-Beaker
* Enabled testing on Python 3.10 and 3.11 * Fixed issue #122 - Session ignores deserializer json * Remove ID generation fallback for when the uuid module is not found * Port testing from nose to pytest * Fixed issue #180 - KeyError when loading deleted session - Remove Python 2 and Python 3 gubbins. - Remove patch denose.patch, merged upstream. - Add patch support-pymemcache.patch: * Also support pymemcache. - Fiddle BuildRequires as appropiate. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Beaker?expand=0&rev=57
27 lines
904 B
Diff
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,
|