Skip to content

Commit db1f998

Browse files
committed
Make tests compatible with client<=0.4 again
1 parent 7c7160d commit db1f998

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

django_prometheus/middleware.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import django
22
from prometheus_client import Counter, Histogram
3-
from prometheus_client.utils import INF
43

54
from django_prometheus.utils import Time, TimeSince, PowersOf
65

@@ -49,7 +48,7 @@ def process_response(self, request, response):
4948
buckets=(.01, .025, .05, .075,
5049
.1, .25, .5, .75,
5150
1.0, 2.5, 5.0, 7.5,
52-
10.0, 25.0, 50.0, 75.0, INF))
51+
10.0, 25.0, 50.0, 75.0, float("inf")))
5352
requests_unknown_latency = Counter(
5453
'django_http_requests_unknown_latency_total',
5554
'Count of requests for which the latency was unknown.')

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Django>=1.8
22
django-redis>=4.8
33
pep8>=1.6.2
4-
prometheus-client>=0.0.21,<0.4.0
4+
prometheus-client>=0.0.21
55
pip-prometheus>=1.1.0
66
mock>=1.0.1
77
mysqlclient<1.4

0 commit comments

Comments
 (0)