From 520e0eeb9f2430b23325fd8e4ea121750f3075c3 Mon Sep 17 00:00:00 2001 From: jwg4 Date: Mon, 21 Aug 2017 09:36:12 +0000 Subject: [PATCH 1/3] Add travis badge to readme --- README | 3 --- README.md | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index cc45c70..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -Flask-Cache - -Adds easy cache support to Flask. diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb4eb20 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Flask-Cache +[![Build Status](https://travis-ci.org/thadeusb/flask-cache.svg?branch=master)](https://travis-ci.org/thadeusb/flask-cache) + +Adds easy cache support to Flask. From 25d0fc10cc3a502155ac9aaca92b0d5b59f6f923 Mon Sep 17 00:00:00 2001 From: jwg4 Date: Mon, 21 Aug 2017 09:44:28 +0000 Subject: [PATCH 2/3] Remove --use-mirrors argument to pip. --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 65ab4ef..4ce41b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ python: - "2.7" - "3.3" install: - - pip install . --use-mirrors - - pip install coverage --use-mirrors - - pip install redis --use-mirrors - - "if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then pip install pylibmc --use-mirrors; fi" - - "if [[ $TRAVIS_PYTHON_VERSION == 3.3* ]]; then pip install python3-memcached --use-mirrors; fi" + - pip install . + - pip install coverage + - pip install redis + - "if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then pip install pylibmc; fi" + - "if [[ $TRAVIS_PYTHON_VERSION == 3.3* ]]; then pip install python3-memcached; fi" script: nosetests --with-coverage --cover-package=flask_cache services: - memcached From 9706b62af5c8f43f0cd65134f103c44a7e365f7e Mon Sep 17 00:00:00 2001 From: jwg4 Date: Thu, 7 Sep 2017 17:15:36 +0000 Subject: [PATCH 3/3] Change this test to look for db=2 This corresponds to the actual current behavior and the behavior of redis-py. The intended behavior might be the opposite, however it makes sense to change the test since 1. Clearly no-one depends on the intended behavior - the tests have not passed for 3 years. 2. Some people might depend on the actual behavior. 3. It seems silly to go out of our way to make this work differently to redis-py. See https://github.com/andymccurdy/redis-py/blob/8a186ebd9cecf466624803bdf215030158c7c776/redis/connection.py#L810 --- test_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_cache.py b/test_cache.py index 9811572..7fca4b4 100644 --- a/test_cache.py +++ b/test_cache.py @@ -679,7 +679,7 @@ def test_22_redis_url_explicit_db_arg(self): cache.init_app(self.app, config=config) rconn = self.app.extensions['cache'][cache] \ ._client.connection_pool.get_connection('foo') - assert rconn.db == 1 + assert rconn.db == 2 class CacheFilesystemTestCase(CacheTestCase):