Skip to content

Commit c7896c0

Browse files
authored
chore: require shiny 1.5.1 (for bookmarking fix) (#150)
* chore: require shiny 1.5.1 (for bookmarking fix) * Drop Python 3.9; add 3.14 * Fix formatting checks
1 parent 42eb376 commit c7896c0

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

.github/workflows/py-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
strategy:
2727
matrix:
2828
config:
29-
- { python-version: "3.9", test_google: false, test_azure: false }
3029
- { python-version: "3.10", test_google: false, test_azure: false }
3130
- { python-version: "3.11", test_google: false, test_azure: false }
3231
- { python-version: "3.12", test_google: true, test_azure: true }
3332
- { python-version: "3.13", test_google: false, test_azure: false }
33+
- { python-version: "3.14", test_google: false, test_azure: false }
3434
fail-fast: false
3535

3636
steps:

pkg-py/src/querychat/_datasource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def get_schema(self, *, categorical_threshold: int) -> str: # noqa: PLR0912
341341
result = conn.execute(stats_query).fetchone()
342342
if result:
343343
# Convert result to dict for easier access
344-
column_stats = dict(zip(result._fields, result))
344+
column_stats = dict(zip(result._fields, result, strict=False))
345345
except Exception: # noqa: S110
346346
pass # Fall back to no statistics if query fails
347347

pkg-py/src/querychat/_querychat_module.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
import warnings
55
from dataclasses import dataclass
66
from pathlib import Path
7-
from typing import TYPE_CHECKING, Callable, Union
7+
from typing import TYPE_CHECKING, Union
88

99
import shinychat
1010
from shiny import module, reactive, ui
1111

1212
from .tools import tool_query, tool_reset_dashboard, tool_update_dashboard
1313

1414
if TYPE_CHECKING:
15+
from collections.abc import Callable
16+
1517
import chatlas
1618
import pandas as pd
1719
from shiny import Inputs, Outputs, Session

pkg-py/src/querychat/tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from pathlib import Path
4-
from typing import TYPE_CHECKING, Callable
4+
from typing import TYPE_CHECKING
55

66
import chevron
77
from chatlas import ContentToolResult, Tool
@@ -11,6 +11,8 @@
1111
from ._utils import df_to_html, querychat_tool_starts_open
1212

1313
if TYPE_CHECKING:
14+
from collections.abc import Callable
15+
1416
from ._datasource import DataSource
1517
from ._querychat_module import ReactiveString, ReactiveStringOrNone
1618

pyproject.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "querychat"
77
version = "0.2.2"
88
description = "Chat with your data using natural language"
99
readme = "pkg-py/README.md"
10-
requires-python = ">=3.9"
10+
requires-python = ">=3.10"
1111
license = { file = "pkg-py/LICENSE" }
1212
authors = [
1313
{ name = "Joe Cheng", email = "[email protected]" },
@@ -21,7 +21,7 @@ maintainers = [
2121
dependencies = [
2222
"duckdb",
2323
"pandas",
24-
"shiny",
24+
"shiny>=1.5.1",
2525
"shinywidgets",
2626
"htmltools",
2727
"chatlas>=0.13.2",
@@ -32,12 +32,11 @@ dependencies = [
3232
]
3333
classifiers = [
3434
"Programming Language :: Python",
35-
"Programming Language :: Python :: 3.8",
36-
"Programming Language :: Python :: 3.9",
3735
"Programming Language :: Python :: 3.10",
3836
"Programming Language :: Python :: 3.11",
3937
"Programming Language :: Python :: 3.12",
4038
"Programming Language :: Python :: 3.13",
39+
"Programming Language :: Python :: 3.14",
4140
]
4241

4342
[project.urls]
@@ -101,7 +100,7 @@ exclude = [
101100
line-length = 88
102101
indent-width = 4
103102

104-
target-version = "py39"
103+
target-version = "py310"
105104

106105
[tool.ruff.lint]
107106
extend-ignore = [
@@ -200,7 +199,7 @@ include = ["pkg-py/src/querychat"]
200199
[tool.tox]
201200
legacy_tox_ini = """
202201
[tox]
203-
env_list = py3{9,10,11,12}
202+
env_list = py3{10,11,12,13,14}
204203
isolated_build = True
205204
206205
[testenv]

0 commit comments

Comments
 (0)