Skip to content

Commit 7aebe8c

Browse files
committed
feat(api)!: update schema timestamp (+1 more change)
- Regenerated with generator `0.32.14` (previously `0.32.0`). - Schema `timestamp` shape changed. BREAKING CHANGE: Schema `timestamp` shape changed. Build: bOvcZYvS3NarRoMC1aix2
1 parent efd744a commit 7aebe8c

3 files changed

Lines changed: 16 additions & 50 deletions

File tree

‎.github/workflows/release-please.yml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
name: Release Please
22

33
on:
4-
# Fires when a human merges the platform-managed release PR into main
5-
# (the PR's base, so its diff shows the full pending release). Regenerations and
6-
# custom-code pushes only touch scalar-next and never run this workflow.
4+
# A release is cut when a human merges the platform-managed release PR into
5+
# main (the PR's base, so its diff shows the full pending release).
6+
# Every other push here runs release-please as well — commits written straight to
7+
# this branch included — and cuts nothing, there being no release commit at the tip.
78
push:
89
branches:
910
- main
11+
# The Scalar platform pushes these workflow files straight to main to keep them
12+
# current between releases; that is bookkeeping, never a release. Running anyway is worse
13+
# than pointless on a branch that has not been handed a .release-please-manifest.json yet —
14+
# release-please fails the run outright when it cannot read one. A release commit always
15+
# rewrites the manifest and the changelog, so this filter can never swallow one.
16+
paths-ignore:
17+
- '.github/workflows/**'
1018
# Manual fallback only; nothing in the automated chain depends on dispatch.
1119
workflow_dispatch:
1220

‎scalar-sdk.manifest.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Scalar",
33
"slug": "scalar",
4-
"generatorVersion": "0.32.0",
4+
"generatorVersion": "0.32.14",
55
"servers": [
66
"https://access.scalar.com"
77
],
@@ -770,7 +770,10 @@
770770
"type": {
771771
"kind": "primitive",
772772
"type": "integer",
773-
"validation": {}
773+
"validation": {
774+
"minimum": 0,
775+
"maximum": 9007199254740991
776+
}
774777
}
775778
},
776779
{

‎src/scalar_sdk/_streaming.py‎

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,8 @@ def __stream__(self) -> Iterator[_T]:
5656
response = self.response
5757
process_data = self._client._process_response_data
5858
iterator = self._iter_events()
59-
content_type = (response.headers.get("content-type") or "").lower()
60-
is_jsonl = "json" in content_type and "event-stream" not in content_type
6159

6260
try:
63-
if is_jsonl:
64-
# Newline-delimited JSON (`application/jsonl`,
65-
# `application/x-jsonl`, etc.) has no SSE framing, so the
66-
# `_decoder.iter_bytes` path above would never yield. We
67-
# parse each non-empty line as one event so callers can
68-
# iterate without caring whether the wire format is SSE
69-
# or JSONL.
70-
buffer = b""
71-
for chunk in response.iter_bytes():
72-
if not chunk:
73-
continue
74-
buffer += chunk
75-
while b"\n" in buffer:
76-
line, buffer = buffer.split(b"\n", 1)
77-
text = line.decode("utf-8").strip()
78-
if not text:
79-
continue
80-
yield process_data(data=json.loads(text), cast_to=cast_to, response=response)
81-
tail = buffer.decode("utf-8").strip()
82-
if tail:
83-
yield process_data(data=json.loads(tail), cast_to=cast_to, response=response)
84-
return
85-
8661
for sse in iterator:
8762
if not sse.data:
8863
continue
@@ -153,28 +128,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
153128
response = self.response
154129
process_data = self._client._process_response_data
155130
iterator = self._iter_events()
156-
content_type = (response.headers.get("content-type") or "").lower()
157-
is_jsonl = "json" in content_type and "event-stream" not in content_type
158131

159132
try:
160-
if is_jsonl:
161-
# See the sync sibling for why JSONL gets its own branch.
162-
buffer = b""
163-
async for chunk in response.aiter_bytes():
164-
if not chunk:
165-
continue
166-
buffer += chunk
167-
while b"\n" in buffer:
168-
line, buffer = buffer.split(b"\n", 1)
169-
text = line.decode("utf-8").strip()
170-
if not text:
171-
continue
172-
yield process_data(data=json.loads(text), cast_to=cast_to, response=response)
173-
tail = buffer.decode("utf-8").strip()
174-
if tail:
175-
yield process_data(data=json.loads(tail), cast_to=cast_to, response=response)
176-
return
177-
178133
async for sse in iterator:
179134
if not sse.data:
180135
continue

0 commit comments

Comments
 (0)