Skip to content

Commit f0a8f0f

Browse files
committed
chore: support Python 3.12
Signed-off-by: SdgJlbl <[email protected]>
1 parent dd01b9b commit f0a8f0f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up python
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
1919
- name: Install tools
2020
run: pip install flake8 black isort wheel docstring-parser
2121
- name: Lint
@@ -45,7 +45,7 @@ jobs:
4545
strategy:
4646
fail-fast: false
4747
matrix:
48-
python-version: ["3.9", "3.10", "3.11"]
48+
python-version: ["3.9", "3.10", "3.11", "3.12"]
4949
name: Tests on Python ${{ matrix.python-version }}
5050
steps:
5151
- name: Set up python

changes/418.added

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

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ classifiers = [
3131
"Programming Language :: Python :: 3.9",
3232
"Programming Language :: Python :: 3.10",
3333
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
3435
]
3536
license = { file = "LICENSE" }
3637
authors = [{ name = "Owkin, Inc." }]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ def _prepare_artifact_input(self, task_input, task_key, input_volume, multiple):
150150
assert output.kind == schemas.AssetKind.model, "The task_input value must be an artifact, not a performance"
151151
filename = _generate_filename()
152152
path_to_input = input_volume / filename
153-
Path(output.asset.address.storage_address).link_to(path_to_input)
153+
Path(output.asset.address.storage_address).hardlink_to(path_to_input)
154154

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

157157
def _prepare_dataset_input(
158158
self, dataset: models.Dataset, task_input: models.InputRef, input_volume: str, multiple: bool
159159
):
160160
path_to_opener = input_volume / Filenames.OPENER.value
161-
Path(dataset.opener.storage_address).link_to(path_to_opener)
161+
Path(dataset.opener.storage_address).hardlink_to(path_to_opener)
162162
return TaskResource(
163163
id=task_input.identifier,
164164
value=f"{TPL_VOLUME_INPUTS}/{Filenames.OPENER.value}",

0 commit comments

Comments
 (0)