From 0875ec01c38f7b60625ecf232e04c7c2fefbf34a Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Fri, 6 Sep 2024 08:27:54 -0400 Subject: [PATCH 1/2] Update for tiled v0.1.0b8 --- databroker/server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/databroker/server.py b/databroker/server.py index 7a9138a45..f2033dbc8 100644 --- a/databroker/server.py +++ b/databroker/server.py @@ -6,7 +6,7 @@ from event_model import DocumentNames, schema_validators from fastapi import APIRouter, HTTPException, Request import pydantic -from tiled.server.core import PatchedStreamingResponse +from starlette.responses import StreamingResponse from tiled.server.dependencies import SecureEntry @@ -44,13 +44,13 @@ def generator_func(): yield packer.pack({"name": name, "doc": doc}) generator = generator_func() - return PatchedStreamingResponse( + return StreamingResponse( generator, media_type="application/x-msgpack" ) if media_type == "application/json-seq": # (name, doc) pairs as newline-delimited JSON generator = (json.dumps({"name": name, "doc": doc}) + "\n" for name, doc in run.documents(fill=fill)) - return PatchedStreamingResponse( + return StreamingResponse( generator, media_type="application/json-seq" ) else: From 8a4dade5707b128bd06095a66cad7fe0fd6df787 Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Fri, 6 Sep 2024 08:57:22 -0400 Subject: [PATCH 2/2] Bump minimum tiled version. --- Dockerfile | 2 +- requirements-client.txt | 2 +- requirements-server.txt | 2 +- requirements-test.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f056dda5..b5018209d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/bluesky/tiled:v0.1.0b7 as base +FROM ghcr.io/bluesky/tiled:v0.1.0b8 as base FROM base as builder diff --git a/requirements-client.txt b/requirements-client.txt index d90fff4d8..53ac230f7 100644 --- a/requirements-client.txt +++ b/requirements-client.txt @@ -1,4 +1,4 @@ mongoquery msgpack >=1.0.0 orjson -tiled[client] >=0.1.0b4 +tiled[client] >=0.1.0b8 diff --git a/requirements-server.txt b/requirements-server.txt index b0f3078ae..cd5b83392 100644 --- a/requirements-server.txt +++ b/requirements-server.txt @@ -16,7 +16,7 @@ pytz rich starlette suitcase-mongo >=0.5.0 -tiled[server] >=0.1.0b4 +tiled[server] >=0.1.0b8 toolz typer tzlocal diff --git a/requirements-test.txt b/requirements-test.txt index f21517cd4..22531410b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -17,6 +17,6 @@ sphinx suitcase-jsonl >=0.1.0b2 suitcase-mongo >=0.5.0 suitcase-msgpack >=0.2.2 -tiled[all] >=0.1.0b4 +tiled[all] >=0.1.0b8 ujson vcrpy