Skip to content

Commit e1be4e2

Browse files
authored
Support Python 3.14, drop support for Python 3.9 (#291)
2 parents 79f93cc + 114edb1 commit e1be4e2

7 files changed

Lines changed: 22 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.9", "3.13", "pypy3.10"]
11+
python-version: ["3.10", "3.14", "pypy3.10"]
1212
include:
13-
- python-version: 3.9
13+
- python-version: 3.10
1414
coverage: "--cov=rebench"
1515
name: "Ubuntu-latest: Python ${{ matrix.python-version }}"
1616
steps:
1717
- name: Checkout ReBench
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919

2020
- name: Setup Python
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
architecture: x64
@@ -42,19 +42,19 @@ jobs:
4242
run: |
4343
pip install pylint
4444
pylint rebench
45-
if: matrix.python-version == '3.13'
45+
if: matrix.python-version == '3.14'
4646

4747
- name: Install and run black
4848
run: |
4949
pip install black
5050
black --check rebench
51-
if: matrix.python-version == '3.13'
51+
if: matrix.python-version == '3.14'
5252

5353
- name: Install and run mypy
5454
run: |
55-
pip install mypy
55+
pip install mypy types-PyYAML types-psutil types-humanfriendly
5656
mypy --install-types --non-interactive rebench
57-
if: matrix.python-version == '3.13'
57+
if: matrix.python-version == '3.14'
5858

5959
- name: Upload coverage results to Coveralls
6060
run: coveralls
@@ -64,15 +64,15 @@ jobs:
6464

6565
test-macos:
6666
runs-on: macos-latest
67-
name: "macOS: Python 3.12"
67+
name: "macOS: Python 3.13"
6868
steps:
6969
- name: Checkout ReBench
70-
uses: actions/checkout@v4
70+
uses: actions/checkout@v6
7171

7272
- name: Setup Python
73-
uses: actions/setup-python@v5
73+
uses: actions/setup-python@v6
7474
with:
75-
python-version: "3.12"
75+
python-version: "3.13"
7676

7777
- name: Install PyTest
7878
run: pip install pytest
@@ -101,7 +101,7 @@ jobs:
101101
apt-get install -y --no-install-recommends time
102102
103103
- name: Checkout ReBench
104-
uses: actions/checkout@v4
104+
uses: actions/checkout@v6
105105

106106
- name: Install PyTest
107107
run: pip3 install pytest
@@ -116,13 +116,13 @@ jobs:
116116
run: python3 -m pytest
117117

118118
test-rocky:
119-
name: "Rocky Linux: Python 3.9"
119+
name: "Rocky Linux 10"
120120
runs-on: ubuntu-latest
121121
container:
122-
image: rockylinux/rockylinux:9
122+
image: rockylinux/rockylinux:10
123123
steps:
124124
- name: Checkout ReBench
125-
uses: actions/checkout@v4
125+
uses: actions/checkout@v6
126126

127127
- name: Install basic tools
128128
run: dnf install -y which time sudo python3-pip
@@ -133,7 +133,7 @@ jobs:
133133
python3 -m virtualenv venv
134134
source venv/bin/activate
135135
136-
pip install pytest
136+
pip install pytest setuptools
137137
pip install .
138138
139139
pytest

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v6
1414
- name: Set up Python
15-
uses: actions/setup-python@v4
15+
uses: actions/setup-python@v6
1616
with:
1717
python-version: '3.x'
1818
- name: Install Dependencies

.pylintrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ persistent=yes
3030
# Specify a configuration file.
3131
#rcfile=
3232

33-
# When enabled, pylint would attempt to guess common misconfiguration and emit
34-
# user-friendly hints instead of false-positive error messages
35-
suggestion-mode=yes
36-
3733
# Allow loading of arbitrary C extensions. Extensions are imported into the
3834
# active Python interpreter and may run arbitrary code.
3935
unsafe-load-any-extension=no

rebench/executor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
# THE SOFTWARE.
20-
from codecs import open as open_with_enc
2120
from collections import deque
2221
from math import floor
2322
from multiprocessing import cpu_count
@@ -450,7 +449,7 @@ def _keep_alive(seconds):
450449
build_command.mark_succeeded()
451450

452451
def process_output(self, name, stdout_result, stderr_result):
453-
with open_with_enc(self.build_log, "a", encoding="utf-8") as log_file:
452+
with open(self.build_log, "a", encoding="utf-8") as log_file:
454453
if stdout_result:
455454
log_file.write(name + "|STD:")
456455
log_file.write(stdout_result)

rebench/model/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def none_or_dict(value) -> Optional[dict[str, Any]]:
7575
def value_with_optional_details(value, default_details=None):
7676
if isinstance(value, dict):
7777
assert len(value) == 1
78-
(value, details) = list(value.items())[0]
78+
value, details = list(value.items())[0]
7979
else:
8080
details = default_details
8181

rebench/tests/configurator_compile_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from ..persistence import DataStore
66
from ..ui import TestDummyUI
77

8-
98
# precedence order/priority, from most important to least important:
109
CONFIG_ELEMENTS = [
1110
"benchmark",

rebench/tests/features/issue_81_unicode_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
# IN THE SOFTWARE.
2020
import os
2121

22-
from codecs import open as open_with_enc
23-
2422
from ...configurator import Configurator, load_config
2523
from ...executor import Executor
2624
from ...persistence import DataStore
@@ -49,7 +47,7 @@ def test_building(self):
4947

5048
self.assertTrue(os.path.exists(self._path + "/build.log"))
5149

52-
with open_with_enc(self._path + "/build.log", "r", encoding="utf-8") as build_file:
50+
with open(self._path + "/build.log", "r", encoding="utf-8") as build_file:
5351
log = build_file.read()
5452

5553
unicode_char = chr(22234)

0 commit comments

Comments
 (0)