Fix MemcachedSession
Remove asyncio loop argument Remove asyncio.coroutine annotation as it is removed in Python 3.11
This commit is contained in:
@@ -327,15 +327,12 @@ class MemcachedSessionInterface(SessionInterface):
|
|||||||
permanent=permanent, **kwargs)
|
permanent=permanent, **kwargs)
|
||||||
self.backend = memcached
|
self.backend = memcached
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def create(self, app: Quart) -> None:
|
||||||
def create(self, app: Quart) -> None:
|
|
||||||
if self.backend is None:
|
if self.backend is None:
|
||||||
import aiomcache
|
import aiomcache
|
||||||
loop = asyncio.get_running_loop()
|
# self.backend = aiomcache.Client("127.0.0.1", 11211)
|
||||||
#self.backend = aiomcache.Client("127.0.0.1", 11211, loop=loop)
|
|
||||||
self.backend = aiomcache.Client(self._config.get('SESSION_MEMCACHED_HOST', '127.0.0.1'),
|
self.backend = aiomcache.Client(self._config.get('SESSION_MEMCACHED_HOST', '127.0.0.1'),
|
||||||
self._config.get('SESSION_MEMCACHED_PORT', 11211),
|
self._config.get('SESSION_MEMCACHED_PORT', 11211))
|
||||||
loop=loop)
|
|
||||||
|
|
||||||
def _get_memcache_timeout(self, timeout):
|
def _get_memcache_timeout(self, timeout):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user