Skip to content

Commit 065c0ba

Browse files
committed
chore: drop Python 3.9 support
Signed-off-by: SdgJlbl <[email protected]>
1 parent b0fa90a commit 065c0ba

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
strategy:
4646
fail-fast: false
4747
matrix:
48-
python-version: ["3.9", "3.10", "3.11", "3.12"]
48+
python-version: ["3.10", "3.11", "3.12"]
4949
name: Tests on Python ${{ matrix.python-version }}
5050
steps:
5151
- name: Set up python

changes/428.removed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop Python 3.9 support.

substra/sdk/backends/local/compute/worker.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,6 @@ def _get_cmd_template_inputs_outputs(
135135
]
136136
return command_template
137137

138-
def _tmp_is_three_nine(self):
139-
"""Temporary helper function to remove as soon as support of Python 3.9 is dropped."""
140-
import platform
141-
142-
return platform.python_version_tuple()[1] == "9"
143-
144138
def _prepare_artifact_input(self, task_input, task_key, input_volume, multiple):
145139
outputs = self._db.list(
146140
schemas.Type.OutputAsset,
@@ -156,21 +150,15 @@ def _prepare_artifact_input(self, task_input, task_key, input_volume, multiple):
156150
assert output.kind == schemas.AssetKind.model, "The task_input value must be an artifact, not a performance"
157151
filename = _generate_filename()
158152
path_to_input = input_volume / filename
159-
if self._tmp_is_three_nine():
160-
Path(output.asset.address.storage_address).link_to(path_to_input)
161-
else:
162-
Path(path_to_input).hardlink_to(output.asset.address.storage_address)
153+
Path(path_to_input).hardlink_to(output.asset.address.storage_address)
163154

164155
return TaskResource(id=task_input.identifier, value=f"{TPL_VOLUME_INPUTS}/{filename}", multiple=multiple)
165156

166157
def _prepare_dataset_input(
167158
self, dataset: models.Dataset, task_input: models.InputRef, input_volume: str, multiple: bool
168159
):
169160
path_to_opener = input_volume / Filenames.OPENER.value
170-
if self._tmp_is_three_nine():
171-
Path(dataset.opener.storage_address).link_to(path_to_opener)
172-
else:
173-
Path(path_to_opener).hardlink_to(dataset.opener.storage_address)
161+
Path(path_to_opener).hardlink_to(dataset.opener.storage_address)
174162
return TaskResource(
175163
id=task_input.identifier,
176164
value=f"{TPL_VOLUME_INPUTS}/{Filenames.OPENER.value}",

0 commit comments

Comments
 (0)