Skip to content

Commit 327e6cc

Browse files
committed
Python version update
1 parent e99d9d5 commit 327e6cc

11 files changed

Lines changed: 1076 additions & 911 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ minimum_pre_commit_version: 3.3.0
22
default_install_hook_types: [pre-commit, commit-msg]
33

44
default_language_version:
5-
python: python3.13
5+
python: python3.14
66

77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM fedora:42
33
ARG USER=odh
44
ARG HOME=/home/$USER
55
ARG TESTS_DIR=$HOME/opendatahub-tests/
6-
ENV UV_PYTHON=python3.13
6+
ENV UV_PYTHON=python3.14
77
ENV UV_COMPILE_BYTECODE=1
88
ENV UV_NO_SYNC=1
99
ENV UV_NO_CACHE=1

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ dev = [
2525
"ipdb>=0.13.13",
2626
"ipython>=8.12.3",
2727
"pre-commit>=4.3.0",
28+
"mypy>=1.13.0",
2829
]
2930

3031
[project]
31-
requires-python = "==3.13.*"
32+
requires-python = "==3.14.*"
3233
name = "opendatahub-tests"
3334
version = "0.1.0"
3435
description = "Tests repository for Open Data Hub (ODH)"

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def gpu_count_on_cluster(nodes: list[Any]) -> int:
809809
if key in allowed_exact or any(key.startswith(p) for p in allowed_prefixes):
810810
try:
811811
total_gpus += int(val)
812-
except (ValueError, TypeError):
812+
except ValueError, TypeError:
813813
LOGGER.debug(f"Skipping non-integer allocatable for {key} on {node.name}: {val!r}")
814814
continue
815815
return total_gpus

tests/model_registry/model_catalog/search/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def _validate_single_criterion(
387387
else:
388388
LOGGER.warning(f"Unknown key_type: {key_type}")
389389
return False, f"{key_name}: unknown type {key_type}"
390-
except (ValueError, TypeError):
390+
except ValueError, TypeError:
391391
return False, f"{key_name}: conversion error"
392392

393393
# Perform comparison based on type

tests/model_serving/model_server/kserve/inference_graph/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ def dog_breed_inference_graph(
127127

128128
try:
129129
name = request.param["name"]
130-
except (AttributeError, KeyError):
130+
except AttributeError, KeyError:
131131
name = "dog-breed-pipeline"
132132

133133
try:
134134
if not request.param["external-route"]:
135135
labels[networking_label] = "cluster-local"
136-
except (AttributeError, KeyError):
136+
except AttributeError, KeyError:
137137
pass
138138

139139
with InferenceGraph(
@@ -253,7 +253,7 @@ def bare_service_account(
253253
try:
254254
if request.param["name"]:
255255
name = request.param["name"]
256-
except (AttributeError, KeyError):
256+
except AttributeError, KeyError:
257257
name = "sa-" + token_hex(4)
258258

259259
with ServiceAccount(

tests/model_serving/model_server/maas_billing/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def mint_token(
9191
)
9292
try:
9393
body = resp.json()
94-
except (JSONDecodeError, ValueError):
94+
except JSONDecodeError, ValueError:
9595
body = {}
9696
return resp, body
9797

@@ -434,7 +434,7 @@ def get_total_tokens(resp: Response, *, fail_if_missing: bool = False) -> int |
434434
if header_val is not None:
435435
try:
436436
return int(header_val)
437-
except (TypeError, ValueError):
437+
except TypeError, ValueError:
438438
if fail_if_missing:
439439
raise AssertionError(
440440
f"Token usage header is not parseable as int; headers={dict(resp.headers)} body={resp.text[:500]}"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ skipsdist = True
44

55
#Unused code
66
[testenv:unused-code]
7-
basepython = python3
7+
basepython = python3.14
88
recreate=True
99
setenv =
1010
PYTHONPATH = {toxinidir}

utilities/infra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ def wait_for_serverless_pods_deletion(resource: Project | Namespace, admin_clien
991991
LOGGER.info(f"Waiting for {KServeDeploymentType.SERVERLESS} pod {pod.name} to be deleted")
992992
pod.wait_deleted(timeout=Timeout.TIMEOUT_1MIN)
993993

994-
except (ResourceNotFoundError, NotFoundError):
994+
except ResourceNotFoundError, NotFoundError:
995995
LOGGER.info(f"Pod {pod.name} is deleted")
996996

997997

utilities/plugins/openai_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def streaming_request_http(
102102
message = json.loads(data)
103103
token = self._parse_streaming_response(endpoint, message)
104104
tokens.append(token)
105-
except (requests.exceptions.RequestException, json.JSONDecodeError):
105+
except requests.exceptions.RequestException, json.JSONDecodeError:
106106
LOGGER.error("Streaming request error")
107107
raise
108108
return "".join(tokens)
@@ -135,7 +135,7 @@ def get_request_http(host: str, endpoint: str) -> Any:
135135
if data:
136136
data = OpenAIClient._remove_keys(data, keys_to_remove)
137137
return data
138-
except (requests.exceptions.RequestException, json.JSONDecodeError):
138+
except requests.exceptions.RequestException, json.JSONDecodeError:
139139
LOGGER.exception("Request error")
140140

141141
@retry(stop=stop_after_attempt(MAX_RETRIES), wait=wait_exponential(min=1, max=6))

0 commit comments

Comments
 (0)