Skip to content

Commit 67b7153

Browse files
authored
compat: Python 3.14 (#1688)
1 parent 7385411 commit 67b7153

File tree

4 files changed

+106
-31
lines changed

4 files changed

+106
-31
lines changed

.github/workflows/test.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: |
6666
MATRIX=$(jq -nsc '{
6767
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
68-
"environment": ["test-310", "test-313"],
68+
"environment": ["test-310", "test-313", "test-314"],
6969
"exclude": [
7070
{
7171
"environment": "test-310",
@@ -79,7 +79,7 @@ jobs:
7979
run: |
8080
MATRIX=$(jq -nsc '{
8181
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
82-
"environment": ["test-310", "test-313"],
82+
"environment": ["test-310", "test-313", "test-314"],
8383
"include": [
8484
{
8585
"environment": "test-311",
@@ -131,6 +131,7 @@ jobs:
131131
- name: Test Unit
132132
run: pixi run -e ${{ matrix.environment }} test-unit-cov
133133
- name: Test Geo
134+
if: ${{ matrix.environment != 'test-314' }}
134135
run: pixi run -e ${{ matrix.environment }} test-unit-geo-cov
135136
- name: Test Examples
136137
run: |

doc/conftest.py

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import sys
32

43
from importlib.util import find_spec
54

@@ -21,27 +20,42 @@
2120
if os.getenv('HVPLOT_INCLUDE_SLOW_EXAMPLES'):
2221
collect_ignore_glob.extend(SLOW_EXAMPLES)
2322

24-
# On MacOs, Python 3.12 and 3.13, got the following error running this:
25-
# `pos = layout(G)`
26-
# => OSError: Format: "dot" not recognized. No formats found.
27-
# Fixed locally by running `dot -c`
28-
if not find_spec('pygraphviz') or (
29-
sys.platform == 'darwin' and sys.version_info[:2] in [(3, 12), (3, 13)]
30-
):
31-
collect_ignore_glob += [
32-
'user_guide/NetworkX.ipynb',
33-
]
3423

35-
if not find_spec('geoviews'):
24+
if not find_spec('geoviews'): # geo examples
3625
collect_ignore_glob += [
3726
'tutorials/getting_started.ipynb',
3827
'gallery/geospatial/*.ipynb',
3928
'gallery/gridded/rgb_satellite_imagery.ipynb',
29+
'ref/api/manual/hvplot.hvPlot.paths.ipynb',
30+
'ref/api/manual/hvplot.hvPlot.points.ipynb',
31+
'ref/api/manual/hvplot.hvPlot.polygons.ipynb',
32+
'ref/api/manual/hvplot.hvPlot.quadmesh.ipynb',
33+
'ref/api/manual/hvplot.hvPlot.rgb.ipynb',
34+
'ref/api/manual/hvplot.hvPlot.vectorfield.ipynb',
35+
'ref/data_libraries.ipynb',
36+
'ref/plotting_options/geographic.ipynb',
4037
'user_guide/Explorer.ipynb',
4138
'user_guide/Geographic_Data.ipynb',
4239
'user_guide/Integrations.ipynb',
4340
]
4441

42+
if not find_spec('datashader'):
43+
collect_ignore_glob += [
44+
'ref/api/manual/hvplot.plotting.scatter_matrix.ipynb',
45+
'ref/plotting_options/resampling.ipynb',
46+
'user_guide/Gridded_Data.ipynb',
47+
'user_guide/Large_Timeseries.ipynb',
48+
'user_guide/Plotting.ipynb',
49+
'user_guide/Plotting_with_Matplotlib.ipynb',
50+
'user_guide/Plotting_with_Plotly.ipynb',
51+
]
52+
53+
if not find_spec('streamz'):
54+
collect_ignore_glob += [
55+
'ref/plotting_options/streaming.ipynb',
56+
]
57+
58+
4559
try:
4660
import ibis
4761
import duckdb
@@ -52,16 +66,17 @@
5266
except ImportError:
5367
pass
5468

55-
try:
56-
webdriver_control.create()
57-
except RuntimeError:
58-
# hvplot.save() with bokeh
59-
collect_ignore_glob += [
60-
'user_guide/Viewing.ipynb',
61-
'user_guide/NetworkX.ipynb',
62-
]
63-
finally:
64-
webdriver_control.cleanup()
69+
if find_spec('selenium'):
70+
try:
71+
webdriver_control.create()
72+
except RuntimeError:
73+
# hvplot.save() with bokeh
74+
collect_ignore_glob += [
75+
'user_guide/Viewing.ipynb',
76+
'user_guide/NetworkX.ipynb',
77+
]
78+
finally:
79+
webdriver_control.cleanup()
6580

6681

6782
if Version(dask.__version__).release < (2025, 1, 0):

pixi.toml

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ no-default-feature = true
3333
features = ["py313", "required", "test-core", "test", "example", "geo", "graphviz", "test-example"]
3434
no-default-feature = true
3535

36+
[environments.test-314]
37+
features = ["py314", "required", "test-core", "test-314", "example-314", "graphviz", "test-example"] # geo
38+
no-default-feature = true
39+
3640
[environments.test-core]
37-
features = ["py313", "required", "test-core"]
41+
features = ["py314", "required", "test-core"]
3842
no-default-feature = true
3943

4044
[environments.docs]
@@ -73,26 +77,28 @@ PYTHONIOENCODING = "utf-8"
7377

7478
[feature.py310.dependencies]
7579
python = "3.10.*"
76-
bokeh_sampledata = "*"
7780

7881
[feature.py311.dependencies]
7982
python = "3.11.*"
80-
bokeh_sampledata = "*"
8183

8284
[feature.py312.dependencies]
8385
python = "3.12.*"
84-
bokeh_sampledata = "*"
8586

8687
[feature.py312.activation.env]
8788
COVERAGE_CORE = "sysmon"
8889

8990
[feature.py313.dependencies]
9091
python = "3.13.*"
91-
bokeh_sampledata = "*"
9292

9393
[feature.py313.activation.env]
9494
COVERAGE_CORE = "sysmon"
9595

96+
[feature.py314.dependencies]
97+
python = "3.14.*"
98+
99+
[feature.py314.activation.env]
100+
COVERAGE_CORE = "sysmon"
101+
96102
# =================== DEV ===================
97103

98104
[feature.dev.dependencies]
@@ -143,6 +149,39 @@ xyzservices = ">=2022.9.0"
143149
geodatasets = ">=2023.12.0"
144150
hvsampledata = ">=0.1.4a2"
145151

152+
[feature.example-314.dependencies]
153+
dask = "*" # dask[dataframe]
154+
# datashader = ">=0.6.5"
155+
duckdb = "*"
156+
qpd = ">=0.4.4"
157+
fugue-sql-antlr = ">=0.2.0"
158+
sqlglot = "*"
159+
jinja2 = "*"
160+
fugue = "*"
161+
ibis-duckdb = ">=9.0.0" # ibis-framework[duckdb]
162+
intake-parquet = ">=0.2.3"
163+
intake-xarray = ">=0.5.0,<2"
164+
intake = ">=0.6.5,<2.0.0"
165+
ipywidgets = "*"
166+
networkx = ">=2.6.3"
167+
matplotlib = "*"
168+
notebook = ">=5.4"
169+
# numba = ">=0.51.0"
170+
pillow = ">=8.2.0"
171+
plotly = "*"
172+
polars = "*"
173+
pooch = ">=1.6.0"
174+
s3fs = ">=2022.1.0"
175+
scikit-image = ">=0.17.2"
176+
scikit-learn = ">=1.4.0"
177+
scipy = ">=1.5.3"
178+
selenium = ">=3.141.0"
179+
# streamz = ">=0.3.0"
180+
xarray = ">=0.18.2"
181+
xyzservices = ">=2022.9.0"
182+
geodatasets = ">=2023.12.0"
183+
hvsampledata = ">=0.1.4a2"
184+
146185
# =================== TESTS ===================
147186

148187
[feature.test-core.dependencies]
@@ -159,7 +198,7 @@ pytest = "*"
159198
ruff = "*"
160199
scipy = "*"
161200
xarray = "*"
162-
# bokeh_sampledata = "*" (only available starting from Python 3.10)
201+
bokeh_sampledata = "*"
163202
psutil = "*"
164203
cftime = "*"
165204
numpydoc = "*"
@@ -188,6 +227,18 @@ dask = "*"
188227
spatialpandas = "*"
189228
duckdb = "*"
190229

230+
[feature.test-314.dependencies]
231+
qpd = ">=0.4.4"
232+
fugue-sql-antlr = ">=0.2.0"
233+
sqlglot = "*"
234+
jinja2 = "*"
235+
fugue = "*"
236+
ibis-duckdb = ">=9.0.0" # ibis-framework[duckdb]
237+
polars = "*"
238+
dask = "*"
239+
# spatialpandas = "*"
240+
duckdb = "*"
241+
191242
[feature.geo.dependencies]
192243
# Geo dependencies are always a little special.
193244
cartopy = "*"
@@ -208,6 +259,11 @@ test-unit-geo = 'pytest -v hvplot --geo'
208259
test-unit-cov = 'pytest -v hvplot --cov=hvplot --cov-branch --cov-append'
209260
test-unit-geo-cov = 'pytest -v hvplot --geo --cov=hvplot --cov-branch --cov-append'
210261

262+
[feature.test-314.tasks]
263+
test-unit-geo = 'pytest -v hvplot --geo'
264+
test-unit-cov = 'pytest -v hvplot --cov=hvplot --cov-branch --cov-append'
265+
test-unit-geo-cov = 'pytest -v hvplot --geo --cov=hvplot --cov-branch --cov-append'
266+
211267
[feature.test-core.tasks]
212268
test-unit = 'pytest -v hvplot'
213269

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3.11",
2626
"Programming Language :: Python :: 3.12",
2727
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
2829
"Operating System :: OS Independent",
2930
"Intended Audience :: Science/Research",
3031
"Intended Audience :: Developers",
@@ -66,7 +67,7 @@ tests-core = [
6667
"ruff",
6768
"scipy",
6869
"xarray",
69-
"bokeh_sampledata; python_version >= '3.10'",
70+
"bokeh_sampledata",
7071
"psutil",
7172
"cftime",
7273
"numpydoc",
@@ -204,6 +205,8 @@ filterwarnings = [
204205
"ignore: 'xdrlib' is deprecated and slated for removal in Python 3.13:DeprecationWarning:metpy.io.nexrad",
205206
# 2023-09: See https://github.com/python-streamz/streamz/issues/460
206207
"ignore: pkg_resources is deprecated as an API:DeprecationWarning:streamz.plugins",
208+
# 2025-10
209+
"ignore:'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17", # OK
207210
]
208211

209212
[tool.codespell]

0 commit comments

Comments
 (0)