Skip to content

Commit 4d8dca2

Browse files
PerfomanceTest.py: raise if py version is < 3.11.0
* tomllib is only available starting from Python 3.11.0 Signed-off-by: Jan Kraemer <jan.kraemer@vector.com> Co-authored-by: Daniel Edwards <daniel.edwards@vector.com>
1 parent fe41d77 commit 4d8dca2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Demos/tools/Benchmark/PerformanceTests.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# SPDX-FileCopyrightText: 2024 Vector Informatik GmbH
22
#
33
# SPDX-License-Identifier: MIT
4+
import platform
5+
6+
min_python_version = (3, 11, 0)
7+
current_python_version = tuple(map(int, platform.python_version_tuple()))
8+
if current_python_version < min_python_version:
9+
raise RuntimeError("The minimum Python version needed is " +
10+
".".join(str(c) for c in min_python_version))
411

512
import dataclasses
613
import tomllib
@@ -10,7 +17,6 @@
1017
import csv
1118
import argparse
1219
import typing
13-
import platform
1420

1521
from git import Repo # PyPI: GitPython
1622

0 commit comments

Comments
 (0)