Commit Graph

350 Commits

Author SHA1 Message Date
Tony Breeds 03c7dc342a Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I6992567be5c078ec1163a7a95e8148a30b57c8f8
2017-09-12 15:58:41 -06:00
Mike Bayer 15fe0d5285 - ensure all threads in thread local test stay up until a flag
is set.  fixes #116

Change-Id: Ic8f781d31ac35372f4fec06b9f98f65a750e6c2e
2017-07-04 10:21:40 -04:00
Mike Bayer 99704b0764 - 0.6.5 prep
Change-Id: Ia3da3aea013ac1cef3581b6e1d2282a8cc647a88
2017-06-26 15:49:38 -04:00
Mike Bayer 50a0d9de0e - 0.6.4 2017-06-26 15:42:46 -04:00
Jamie Lennox e5508c0989 Raise PluginNotFound exception when not found
A new exception class :class:`.exception.PluginNotFound` is now
raised when a particular cache plugin class cannot be located
either as a setuptools entrypoint or as a registered backend.
Previously, a plain ``Exception`` was thrown.  Pull request
courtesy Jamie Lennox.

Change-Id: Iceab2d613d2d802618dc0bed8ec2db694176c788
2017-06-26 11:55:30 -04:00
Paul Brown eec8a9731b Produce consistent string for __repr__() of NoValue
The :attr:`.api.NO_VALUE` constant now has a fixed ``__repr__()``
output, so that scenarios where this constant's string value
ends up being used as a cache key do not create multiple values.
Pull request courtesy Paul Brown.

Change-Id: Iecc9633d6be562bc6821bf4ee2ff3f29d1b31e80
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/61
2017-06-26 10:31:31 -04:00
tsauerwein 2f82d8f3c0 Do not store empty dict when using Region.get_or_create_multi with should_cache_fn
If `Region.get_or_create_multi` is used with a `should_cache`
function and no value of the current set should be cached,
do not try to store the empty dict in the backend.  It's
unnecessary and also breaks on some backends such as Redis.

Change-Id: Ib7a48d0d7b2f6569e09008f4603f8a355bf9396a
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/58
2017-06-23 15:31:47 -04:00
Mike Bayer 14510be1a6 - 0.6.4 setup
Change-Id: Ic7c3c96d0af65d1f5044572cb360ae57ba2edd93
2017-06-23 15:09:01 -04:00
Mike Bayer 22574be17a - 0.6.3
Change-Id: I1c30b5973157cecb14df2575f9d247e4beaffdf8
2017-05-18 09:41:41 -04:00
Mike Bayer 78e086b550 - 2017
Change-Id: Id65411269849b985b6e11c98af25522492830ce3
2017-05-18 09:41:00 -04:00
Mike Bayer a63a0733f3 Propagate backend test message if env variables are set
The only place we test "connect to backend" for memcached/redis is
in _check_backend_available.  If the pifpaf environment variable
is set, assume the memcached/redis service is running, and propagate
if connect fails in this case.

Change-Id: I861b8bf028300e968e4f571a9f0aa31a2f35e8fa
2017-04-24 16:41:20 -04:00
Mike Bayer d707538994 Add py36
Change-Id: Id645dc509b871e5656b6759b8684b82b2d3eb5d8
2017-01-13 15:38:22 -05:00
Mike Bayer 7a52f09e6c - dont use sitepackages, we'd rather install deps each
time to check for breakage

Change-Id: I9f57c5c1abd92d6269fb3b41de71f54cc4608c3e
2017-01-13 15:00:40 -05:00
Daniel Kraus 7f81a5ab30 Add replace_existing_backend to configure_from_config
Change-Id: I36eb436c47377725e38870e6208a09ff2ffd16b1
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/59
2016-10-24 11:24:59 -04:00
Mike Bayer 669582c2e5 - 0.6.2 2016-08-16 10:57:16 -04:00
Timon Wong de40af3233 Fix key_mangler is always reset to None in tests
When `_user_defined_key_mangler` is not set, after calling `configure()` method on a region instance, it will be reset to `backend`'s default, which is `None`. So during the tests, the `_store_keys()` mangler function will never be called.

Change-Id: I0da923d6f3ef5f4c6b8ef468898ad2ce8d02e717
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/54
2016-07-08 11:59:35 -04:00
Mike Bayer 22e5d026cd - fix formatting
Change-Id: I492e6335d906c70f5a2178882b4c73c931abe8cc
2016-07-06 15:59:41 -04:00
mike bayer ad4b36f24f Merge "Make cache region invalidation pluggable" 2016-07-05 18:26:59 -04:00
Alexander Makarov d521db7eb4 Make cache region invalidation pluggable
Introduce class RegionInvalidationStrategy that performs region
invalidation. Add region_invalidator parameter
to CacheRegion.configure to pass custom invalidator object.

Fixes: #38
Change-Id: I62f5394e3916ed8debf9e23fcd18df4c4793f69c
2016-06-30 11:08:17 -04:00
Jamie Lennox 85dd3797d5 Link moved functions in dogpile.cache.util
Change-Id: I5819a237d6abe7c2ee5e04abeedc06ff229388a8
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/51
2016-06-21 13:14:09 -04:00
Morgan Fainberg 656df0ba9d Add a key-word-arg aware cache-key generator
Add in a key-word-arg cache key generator that may be optionally
used. This generator will generate a key that mirrors closely to
the original key generator. The key difference is that it will
flatten all arguments down to just the values ordered alphabetically
based on the argument name. This order will be used to ensure that
regardless of the order that the keys are passed (positional,
key-word, or out-of-order key-word) the cache key ends up being
the same.

This was not made the default keygenerator to avoid reverse
incompatibilities with developers that are relying on stable
cache-key generation (e.g. storing data via the memcache-like
interface to a non-volitile backend).

Fixes: #43
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I86c9d5e9c611090d5a84d8a746486a0b6c80039a
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/46
2016-06-21 11:11:21 -04:00
Mike Bayer c185db8749 - next release
Change-Id: I65fe58bbb1f6b11a9fccae21de070d34b58555b0
2016-06-21 10:30:09 -04:00
Mike Bayer ab3431f590 - comment out more unreliable bmemcached tests
Change-Id: Iaf10a097b90ace7c96962ead8202beb346002e72
2016-06-14 10:53:37 -04:00
Mike Bayer 1253edbacc Use a weakref instead of __del__ for reference counting
Try to improve test stability here using a weakref.ref counting
approach

Change-Id: I02ed38c2c4d070c1e5d3ce8336500cf977e06434
2016-06-13 16:41:39 -04:00
Morgan Fainberg 4048651252 Add port to .gitreview
Change-Id: Ie441bd131d2326f8ab6e5afe522bfef1305215d0
2016-06-09 11:55:16 -07:00
Mike Bayer c6fc55cd04 - Fixed imports for ``dogpile.core`` restoring ``ReadWriteMutex``
and ``NameRegistry`` into the base namespace, in addition to
``dogpile.core.nameregistry`` and ``dogpile.core.readwrite_lock``.
fixes #99
- 0.6.1 release

Change-Id: I57c24fc6452e65fa99922547bede13d19582406a
2016-06-06 18:42:57 -04:00
Mike Bayer d5ee158282 - 0.6.0 2016-06-06 12:19:05 -04:00
Mike Bayer d886ae77b3 - fix import in redis
- correct test fixtures to illustrate import failure
of backend vs. not having actual drivers installed
2016-06-06 11:07:46 -04:00
Mike Bayer 9e849e415b - riak link is dead 2016-06-06 10:58:11 -04:00
Mike Bayer 5a3ac23735 - stable
- cleanup
2016-06-06 10:50:59 -04:00
Mike Bayer 5dce2a98bc - add hash_port.py and document this 2016-06-06 10:48:52 -04:00
Mike Bayer f367bdf83a - ensure log_tests.ini, tox.ini in manifest 2016-06-06 10:42:20 -04:00
Mike Bayer 15336ead7b - add skips for BMemcached which generally isn't as solid
as the other memcached libs

Change-Id: I551bd6b7b16766892addc71695ee4a7e15098d24
2016-06-03 17:28:22 -04:00
Mike Bayer 93ffae80af - ensure coverage append so that multiple matrix builds collect
Change-Id: I52a50591a0e34c938da5c00d090c7e8a2465b11f
2016-06-03 16:48:21 -04:00
Morgan Fainberg 761dc0a9e4 Merge dogpile.core into dogpile.cache.
The dogpile.core package itself is EOLed.   The features
within it are now moved underneath the "dogpile"
and "dogpile.util" namespaces, and the namespace packaging
directives are removed.   dogpile.cache has no
dependencies on "dogpile.core" as a namespace any longer,
though it does provide dogpile/core.py for backwards
compatibility.

fixes #91

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ia1ca428616073755aec74c2ac4780cd634092ca8
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/48
2016-06-02 17:59:19 -04:00
Mike Bayer a0ad86064b - add an extra gc.collect() here to help this test succeed
Change-Id: I16a5e9ca797d47d3ce05dc4eb57bc70aa6f28699
2016-06-02 17:59:00 -04:00
Mike Bayer b036e30c3e Copy arguments passed to Redis
The Redis backend now creates a copy of the "arguments" dictionary passed
to it, before popping values out of it.  This prevents the given
dictionary from losing its keys.

Change-Id: I17c5891cea82c2edaa09290ff974a261f909a811
(cherry picked from commit 4ca3e02f21338a3566697a84c12366b7b1950de5)
2016-05-27 14:39:10 -04:00
Mike Bayer 94c4daf450 Set up ports for python environments
Allow concurrent jenkins builds to run on different python
versions.

Change-Id: I518a00156c632abca41092fb837ebada5f51effa
2016-05-27 13:52:15 -04:00
Jamie Lennox 97add35012 NullLock.acquire should accept wait parameter, return boolean
The interface for acquiring locks specifies that they should accept and
default to wait=True. NullLock wasn't implementing this correctly.
Additionally, the acquire() function needs to return a boolean value
to indicate that the lock was acquired (which in the case of NullLock
is unconditional).

Fixes: #97

Change-Id: I45487cd602b562242e425395728a9ed7e78d797e
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/50
2016-05-26 17:37:55 -04:00
Mike Bayer a923e7ee09 Use tox and pifpaf for testing
This sets up a tox environment that conditionally runs tests
for either redis, memcached, or dbm, using pifpaf to install ad-hoc
redis and/or memcached servers on private ports.  This will allow
concurrent test runs against separate memcached / redis instances.
Additionally, the tox environment is split out so that we can easily
use a jenkins matrix build for parallelism.

Change-Id: I56b98e2b2b023b4178d77203a07c72b8fa5dfd3d
2016-05-26 12:31:28 -04:00
Mike Bayer 76245bcc50 Add gitreview file
Change-Id: Id007aee8f77d26217434f285300621cf22864de5
2016-05-26 10:31:18 -04:00
Morgan Fainberg 87965ada18 Merged in morgan_fainberg/dogpile.cache/ergo/allow-for-a-way-to-execute-the-decorated-1454883579633 (pull request #49)
Ergo/allow for a way to execute the decorated 1454883579633
2016-05-03 08:14:20 -07:00
Morgan Fainberg f30bc2bfeb Add test for original fn set
Add a test for the original fn set when cache_on_arguments decorator is
used. This ensures the original fn is located at resulting
<decorated_func>.orignal
2016-05-03 08:06:42 -07:00
Marcin Lulek 9fe7f57d42 Allow for a way to execute the decorated callable bypassing caching completly 2016-02-07 22:19:46 +00:00
Mike Bayer c6913eb143 - ensure the value passed to ProxyBackend is a CachedValue which can of
course be altered to be anything else on the way to the cache / back
to CachedValue on the way out, references #18
2015-11-11 14:39:54 -05:00
Mike Bayer d9ce51f994 0.5.7 2015-10-19 16:36:37 -04:00
Mike Bayer d2d655a3f1 - fix formatting 2015-10-19 16:36:33 -04:00
Mike Bayer 0be785d0fd Merge branch 'feature-get_or_create_multi_docs' of https://bitbucket.org/jvanasco/dogpile.cache 2015-10-19 16:25:32 -04:00
Mike Bayer 914954d34e - add a clarifying note 2015-10-19 16:24:13 -04:00
Mike Bayer 2af09b26e1 - changelog for ref #54 2015-10-19 15:36:59 -04:00