Skip to content

Commit 6153382

Browse files
authored
Merge PR #203: Update Python Version in CI
2 parents 3816227 + 6c153be commit 6153382

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: [ '2.7', '3.7', '3.9', 'pypy3.9' ]
11+
python-version: [ '2.7', '3.7', '3.11', 'pypy3.9' ]
1212
yaml-parser: ['', 'ruamel']
1313
include:
1414
- python-version: 2.7
1515
coverage: "--cov=rebench"
1616
exclude:
1717
- python-version: 2.7
1818
yaml-parser: ruamel
19-
- python-version: 3.9
19+
- python-version: 3.11
2020
yaml-parser: ruamel
2121
- python-version: pypy3
2222
yaml-parser: ruamel
@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
pip install pylint
5656
pylint rebench
57-
if: matrix.python-version == '3.9'
57+
if: matrix.python-version == '3.11'
5858

5959
- name: Upload coverage results to Coveralls
6060
run: coveralls

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,4 +482,4 @@ known-third-party=enchant
482482

483483
# Exceptions that will emit a warning when being caught. Defaults to
484484
# "Exception"
485-
overgeneral-exceptions=Exception
485+
overgeneral-exceptions=builtins.Exception

rebench/configurator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self, run_filters):
9898
elif parts[0] == "m" and len(parts) == 2:
9999
self._machine_filters.append(_MachineFilter(parts[1]))
100100
else:
101-
raise Exception("Unknown filter expression: " + run_filter)
101+
raise RuntimeError("Unknown filter expression: " + run_filter)
102102

103103
def applies_to_bench(self, bench):
104104
return (self._match(self._executor_filters, bench) and

rebench/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,4 @@ def determine_environment():
136136
if _environment:
137137
return _environment
138138

139-
raise Exception("Environment was not initialized before accessing it.")
139+
raise RuntimeError("Environment was not initialized before accessing it.")

rebench/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _estimate_time_left(self):
6767
return 0, 0, 0
6868

6969
current = time()
70-
time_per_invocation = ((current - self._start_time) / self._runs_completed)
70+
time_per_invocation = (current - self._start_time) / self._runs_completed
7171
etl = time_per_invocation * (self._total_num_runs - self._runs_completed)
7272
sec = etl % 60
7373
minute = (etl - sec) / 60 % 60

rebench/model/profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def compile(cls, profiler_data):
1616
perf = PerfProfiler(k, v)
1717
profilers.append(perf)
1818
else:
19-
raise Exception("Not yet supported profiler type: " + k)
19+
raise NotImplementedError("Not yet supported profiler type: " + k)
2020
return profilers
2121

2222
def __init__(self, name, gauge_name):

rebench/persistence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def set_start_time(self, start_time):
403403
self._start_time = start_time
404404

405405
def load_data(self, runs, discard_run_data):
406-
raise Exception("Does not yet support data loading from ReBenchDB")
406+
raise RuntimeError("Does not yet support data loading from ReBenchDB")
407407

408408
def persist_data_point(self, data_point):
409409
with self._lock:

rebench/tests/mock_http_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def start(self):
5050
self._server = HTTPServer(('localhost', self._port), _RequestHandler)
5151

5252
self._thread = Thread(target=self._server.serve_forever)
53-
self._thread.setDaemon(True)
53+
self._thread.daemon = True
5454
self._thread.start()
5555

5656
def shutdown(self):

rebench/ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def step(self, progress=0, label=None):
214214
assert not self.interactive
215215
label = label or self.label
216216
if not label:
217-
raise Exception("No label set for spinner!")
217+
raise RuntimeError("No label set for spinner!")
218218

219219
if self.total:
220220
label = "%s: %.2f%%\n" % (label, progress / (self.total / 100.0))

0 commit comments

Comments
 (0)