Skip to content

Commit 032cb95

Browse files
committed
Update
1 parent 0ca6782 commit 032cb95

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
import time
88
from pyprometheus.storage import BaseStorage
99
from pyprometheus.utils import measure_time as measure_time_manager
10+
try:
11+
xrange = xrange
12+
except Exception:
13+
xrange = range
1014

1115

1216
@pytest.fixture

pyprometheus/contrib/uwsgi_features.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
except ImportError:
2828
uwsgi = None
2929

30+
try:
31+
xrange = xrange
32+
except Exception:
33+
xrange = range
34+
3035

3136
class InvalidUWSGISharedareaPagesize(Exception):
3237
pass

tests/test_storage.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
import random
55
import threading
66

7+
try:
8+
xrange = xrange
9+
except Exception:
10+
xrange = range
11+
712
DATA = (
813
((2, 'metric_gauge_name', '', (('label1', 'value1'), ('label2', 'value2'))), 5),
914
((3, 'metric_counter_name', '', (('label1', 'value1'), ('label2', 'value2'))), 7),

tests/test_uwsgi_collector.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
from pyprometheus.contrib.uwsgi_features import UWSGICollector, UWSGIStorage
99
from pyprometheus.registry import BaseRegistry
1010
from pyprometheus.utils.exposition import registry_to_text
11+
try:
12+
xrange = xrange
13+
except Exception:
14+
xrange = range
1115

1216

1317
def test_uwsgi_collector():

0 commit comments

Comments
 (0)