An oslo.config enabled dogpile.cache.
Go to file
Ben Nemec f4a25f6429 Fix memcache pool client in monkey-patched environments
First off, this is an ugly hack, but we're dealing with code that
essentially monkey-patches a monkey-patch. You reap what you sow.

Per the linked bug, our connection pool client explodes on python 3
with eventlet monkey-patching in force:

TypeError: object() takes no parameters

This is due to the way __new__ is overridden in the class. We need
to strip arguments from the call before they get to object(), which
doesn't accept args.

Unfortunately, when we're _not_ monkey-patched, adding the new
override implementation fails with:

TypeError: object.__new__(_MemcacheClient) is not safe,
use Client.__new__()

As such, we need different implementations depending on whether we
are monkey-patched or not. This change passes both with and without
monkey-patching and adds a unit test that exposes the bug.

Note that this is a temporary, backportable fix that will ultimately
be replaced by a switch to the pymemcache library which does not
have the threading.local problem being worked around here.

Change-Id: I039dffadeebd0ff4479b9c870c257772c43aba53
Partial-Bug: 1812935
2019-02-27 16:19:34 +00:00
doc Avoid use of autodoc_tree_index_modules 2018-04-12 16:13:14 -04:00
oslo_cache Fix memcache pool client in monkey-patched environments 2019-02-27 16:19:34 +00:00
releasenotes Config dict arguments.url must be a list 2018-10-16 11:06:10 -07:00
tools Don't let tox_install.sh error if there is nothing to do 2018-05-01 15:48:53 +00:00
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:42:30 +00:00
.gitignore Clean up .gitignore references to personal tools 2018-10-15 11:42:58 +08:00
.gitreview Initial commit from oslo cookiecutter template 2015-04-15 11:22:01 -05:00
.mailmap Initial commit from oslo cookiecutter template 2015-04-15 11:22:01 -05:00
.stestr.conf Switch to stestr 2018-07-03 16:10:58 +07:00
.zuul.yaml Use template for lower-constraints 2018-12-20 20:09:03 +01:00
CONTRIBUTING.rst Optimize the link address 2017-04-08 22:33:53 +08:00
HACKING.rst update the doc URLs 2017-07-11 21:51:41 +08:00
LICENSE Initial commit from oslo cookiecutter template 2015-04-15 11:22:01 -05:00
README.rst Add release notes link to README 2018-06-21 13:15:06 +08:00
babel.cfg Initial commit from oslo cookiecutter template 2015-04-15 11:22:01 -05:00
lower-constraints.txt Switch to stestr 2018-07-03 16:10:58 +07:00
requirements.txt uncap dogpile 2019-02-09 21:05:56 -06:00
setup.cfg Update mailinglist from dev to discuss 2018-12-05 09:38:02 +08:00
setup.py Updated from global requirements 2017-03-03 00:02:46 +00:00
test-requirements.txt Switch to stestr 2018-07-03 16:10:58 +07:00
tox.ini Don't quote {posargs} in tox.ini 2018-10-09 13:32:34 +00:00

README.rst

Team and repository tags

image

oslo.cache

Latest Version

Downloads

oslo.cache aims to provide a generic caching mechanism for OpenStack projects by wrapping the dogpile.cache library. The dogpile.cache library provides support memoization, key value storage and interfaces to common caching backends such as Memcached.