Skip to content

Commit edf1959

Browse files
authored
Fix: on python 3.14, adjust minimal dep versions to those that support 3.14. Update polars to the version that added UInt128 (which recently committed code uses). (#154)
For duckdb this is a minor version upgrade, so the new dep applies to all python versions. The type hint change in the code is needed by the new duckdb version's type hints. Fixes agentune/aoa#411
1 parent b3efcf3 commit edf1959

File tree

3 files changed

+66
-41
lines changed

3 files changed

+66
-41
lines changed

agentune/core/database.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ def _mandatory_config_dict(self) -> dict[str, str]:
314314
'python_enable_replacements': 'False',
315315
}
316316

317-
def to_config_dict(self) -> dict[str, str]:
317+
def to_config_dict(self) -> dict[str, str | bool | int | float | list[str]]:
318+
"""The verbose return type avoids a type error when passing the dict to duckdb.connect().
319+
In practice, we return a dict containing only string values.
320+
"""
318321
set_fields = { k: str(v) for k, v
319322
in cattrs.Converter().unstructure_attrs_asdict(self).items()
320323
if v is not None and k != 'config' }

poetry.lock

Lines changed: 43 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,30 @@ packages = [{include = "agentune"}]
4545

4646
[tool.poetry.dependencies]
4747
python = "^3.12.6"
48-
duckdb = ">=1.4.1,<1.5.0"
48+
duckdb = ">=1.4.2,<1.5.0"
4949
pyarrow = [
5050
{ version = ">=19.0.1", python = "<3.14" },
5151
{ version = ">=22.0.0", python = ">=3.14" }
5252
]
53-
numpy = "^2.2.4"
53+
numpy = [
54+
{ version = "^2.2.4", python = "< 3.14" },
55+
{ version = "^2.3.4", python = ">= 3.14" }
56+
]
5457
janus = "^2.0.0"
55-
polars = "^1.27.1"
58+
polars = "^1.34.0"
5659
attrs = "^25.3.0"
57-
scikit-learn = "^1.6.1"
58-
scipy = "^1.15.3"
59-
scipy-stubs = "^1.15.3.0"
60+
scikit-learn = [
61+
{ version = "^1.6.1", python = "< 3.14" },
62+
{ version = "^1.7.2", python = ">= 3.14" }
63+
]
64+
scipy = [
65+
{ version = "^1.15.3", python = "< 3.14" },
66+
{ version = "^1.16.1", python = ">= 3.14" }
67+
]
68+
scipy-stubs = [
69+
{ version = "^1.15.3", python = "< 3.14" },
70+
{ version = "^1.16.1", python = ">= 3.14" }
71+
]
6072
cattrs = "^25.3.0"
6173
httpx = {extras = ["http2"], version = "^0.28.1"}
6274
frozendict = "^2.4.6"
@@ -87,7 +99,7 @@ addopts = [
8799
testpaths = [ "tests" ]
88100
pythonpath = ["."]
89101
tmp_path_retention_policy = "none"
90-
asyncio_mode = "auto"
102+
asyncio_mode = "auto"
91103
markers = [
92104
"integration: marks tests as integration tests (deselected by default)"
93105
]

0 commit comments

Comments
 (0)