Skip to content

Commit 21c415d

Browse files
fkiralySimonBlanke
andauthored
[MNT] python 3.14 compatibility and python 3.9 end-of-life (#202)
* removes support for python 3.9 which has reached end-of-life * adds support for python 3.14 `sktime` is not yet compatible with 3.14, this is handled with a condition on python. (we need to see if anything fails, before merging) --------- Co-authored-by: Simon Blanke <simon.blanke.opensource@gmail.com> Co-authored-by: Simon Blanke <simon.blanke@yahoo.com>
1 parent 87e670a commit 21c415d

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
name: test-no-extras
5858
strategy:
5959
matrix:
60-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
60+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
6161
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
6262
exclude:
6363
- os: "windows-latest"
@@ -94,7 +94,7 @@ jobs:
9494
name: test-all-extras
9595
strategy:
9696
matrix:
97-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
97+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
9898
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
9999
exclude:
100100
- os: "windows-latest"
@@ -135,7 +135,7 @@ jobs:
135135
fail-fast: false
136136
matrix:
137137
sklearn-version: ["1.5", "1.6", "1.7"]
138-
python-version: ["3.11", "3.12", "3.13"]
138+
python-version: ["3.11", "3.12", "3.13", "3.14"]
139139

140140
steps:
141141
- uses: actions/checkout@v4
@@ -148,7 +148,7 @@ jobs:
148148
- name: Install dependencies for scikit-learn ${{ matrix.sklearn-version }}
149149
run: |
150150
python -m pip install --upgrade pip
151-
python -m pip install .[all_extras,test] scikit-learn==${{ matrix.sklearn-version }}
151+
python -m pip install .[all_extras,test] scikit-learn==${{ matrix.sklearn-version }}.*
152152
153153
- name: Show dependencies
154154
run: python -m pip list

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name = "hyperactive"
1010
version = "5.0.2"
1111
description = "An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models."
1212
readme = "README.md"
13-
requires-python = ">=3.9"
13+
requires-python = ">=3.10"
1414
license = {file = "LICENSE"}
1515
keywords = ["visualization", "data-science"]
1616
authors = [
@@ -21,11 +21,11 @@ maintainers = [
2121
]
2222
classifiers=[
2323
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.9",
2524
"Programming Language :: Python :: 3.10",
2625
"Programming Language :: Python :: 3.11",
2726
"Programming Language :: Python :: 3.12",
2827
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
2929
"License :: OSI Approved :: MIT License",
3030
"Operating System :: OS Independent",
3131
"Topic :: Scientific/Engineering :: Information Analysis",
@@ -51,7 +51,7 @@ sklearn-integration = [
5151
]
5252
sktime-integration = [
5353
"skpro",
54-
"sktime",
54+
'sktime; python_version < "3.14"',
5555
]
5656
build = [
5757
"setuptools",
@@ -63,7 +63,7 @@ test = [
6363
"flake8",
6464
"pytest-cov",
6565
"pathos",
66-
"torch",
66+
'torch; python_version < "3.14"',
6767
"tf_keras",
6868
]
6969
test_parallel_backends = [
@@ -87,7 +87,7 @@ all_extras = [
8787
[tool.ruff]
8888
line-length = 88
8989
exclude = [".git", "examples/*"]
90-
target-version = "py39"
90+
target-version = "py310"
9191
extend-include = ["*.ipynb"]
9292

9393
[tool.ruff.lint]

src/hyperactive/experiment/integrations/torch_lightning_experiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def _evaluate(self, params):
187187
)
188188
if hasattr(val_result, "item"):
189189
val_result = np.float64(val_result.detach().cpu().item())
190-
elif isinstance(val_result, (int, float)):
190+
elif isinstance(val_result, int | float):
191191
val_result = np.float64(val_result)
192192
else:
193193
val_result = np.float64(float(val_result))

src/hyperactive/opt/optuna/_gp_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class GPOptimizer(_BaseOptunaAdapter):
5959
"info:local_vs_global": "global",
6060
"info:explore_vs_exploit": "exploit",
6161
"info:compute": "high",
62-
"python_dependencies": ["optuna"],
62+
"python_dependencies": ["optuna", "torch"],
6363
}
6464

6565
def __init__(

0 commit comments

Comments
 (0)