1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
diff --git a/graphite_api/config.py b/graphite_api/config.py
index 5e1e382..dc033a8 100644
--- a/graphite_api/config.py
+++ b/graphite_api/config.py
@@ -112,11 +112,11 @@ def configure(app):
app.cache = None
if 'cache' in config:
try:
- from flask.ext.cache import Cache
+ from flask_caching import Cache
except ImportError:
warnings.warn("'cache' is provided in the configuration but "
- "Flask-Cache is not installed. Please `pip install "
- "Flask-Cache`.")
+ "flask-caching is not installed. Please `pip "
+ "install flask-caching`.")
else:
cache_conf = {'CACHE_DEFAULT_TIMEOUT': 60,
'CACHE_KEY_PREFIX': 'graphite-api:'}
diff --git a/requirements.txt b/requirements.txt
index c68b446..7826b0c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
Flask
-Flask-Cache
+Flask-Caching
cairocffi
pyparsing>=1.5.7
pytz
diff --git a/setup.py b/setup.py
index 0337cbe..df07989 100644
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ setup(
extras_require={
'sentry': ['raven[flask]'],
'cyanite': ['cyanite'],
- 'cache': ['Flask-Cache'],
+ 'cache': ['Flask-Caching'],
'statsd': ['statsd'],
},
zip_safe=False,
diff --git a/tests/test_render.py b/tests/test_render.py
index be5609d..a0e7190 100644
--- a/tests/test_render.py
+++ b/tests/test_render.py
@@ -8,7 +8,7 @@ from graphite_api._vendor import whisper
from . import TestCase, WHISPER_DIR
try:
- from flask.ext.cache import Cache
+ from flask_caching import Cache
except ImportError:
Cache = None
diff --git a/tox.ini b/tox.ini
index 85a0abb..c820393 100644
--- a/tox.ini
+++ b/tox.ini
@@ -47,7 +47,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
mock
@@ -56,7 +56,7 @@ basepython = python3.3
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
[testenv:py34]
@@ -66,7 +66,7 @@ commands =
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
[testenv:py35]
@@ -76,7 +76,7 @@ commands =
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
[testenv:pyparsing1]
@@ -84,7 +84,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing==1.5.7
mock
@@ -93,7 +93,7 @@ basepython = pypy
deps =
{[testenv]deps}
Flask
- Flask-Cache
+ Flask-Caching
pyparsing
mock
@@ -102,7 +102,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask<0.9
- Flask-Cache
+ Flask-Caching
pyparsing
mock
@@ -111,7 +111,7 @@ basepython = python2.7
deps =
{[testenv]deps}
Flask<0.10
- Flask-Cache
+ Flask-Caching
pyparsing
mock
|