Skip to content

Commit 0bd83d9

Browse files
fix: adapt to new websockets API (#234)
* wip * pycodestyle * update dependencies * skl2onnx * use ruff * apply formatter * apply lint auto fixes * manually apply lints * change check * ruff ci from branch * fix websockets API * revert pyproject * fix doc comment * set ci branch to main again
1 parent eb3ccbc commit 0bd83d9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
check:
15-
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@ruff
15+
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@main
1616

1717
strategy:
1818
fail-fast: false
@@ -28,7 +28,7 @@ jobs:
2828
# Checks the library using minimum version resolution
2929
# `uv` has this feature built-in, c.f. https://github.com/astral-sh/uv
3030
check-min-version:
31-
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@ruff
31+
uses: geo-engine/geoengine-python/.github/workflows/test-python.yml@main
3232

3333
with:
3434
python-version: "3.10"

geoengine/workflow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import requests as req
2626
import rioxarray
2727
import websockets
28+
import websockets.asyncio.client
2829
import xarray as xr
2930
from owslib.util import Authentication, ResponseWrapper
3031
from owslib.wcs import WebCoverageService
@@ -622,7 +623,7 @@ async def raster_stream(
622623

623624
async with websockets.asyncio.client.connect(
624625
uri=self.__replace_http_with_ws(url),
625-
extra_headers=session.auth_header,
626+
additional_headers=session.auth_header,
626627
open_timeout=open_timeout,
627628
max_size=None,
628629
) as websocket:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies = [
2929
"rioxarray >=0.9.1, <0.20",
3030
"StrEnum >=0.4.6,<0.5", # TODO: use from stdlib when `python_requires = >=3.11`
3131
"vega >= 3.5,<4.2",
32-
"websockets >= 14.0,<16",
32+
"websockets >= 14.2,<16",
3333
"xarray >=0.19,<2025.8",
3434
"urllib3 >= 2.1, < 2.6",
3535
"pydantic >= 2.10.6, < 2.12",

0 commit comments

Comments
 (0)