anchorbrowser 0.3.9__py3-none-any.whl → 0.3.11__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,11 +54,12 @@ class Stream(Generic[_T]):
54
54
  process_data = self._client._process_response_data
55
55
  iterator = self._iter_events()
56
56
 
57
- for sse in iterator:
58
- yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59
-
60
- # As we might not fully consume the response stream, we need to close it explicitly
61
- response.close()
57
+ try:
58
+ for sse in iterator:
59
+ yield process_data(data=sse.json(), cast_to=cast_to, response=response)
60
+ finally:
61
+ # Ensure the response is closed even if the consumer doesn't read all data
62
+ response.close()
62
63
 
63
64
  def __enter__(self) -> Self:
64
65
  return self
@@ -117,11 +118,12 @@ class AsyncStream(Generic[_T]):
117
118
  process_data = self._client._process_response_data
118
119
  iterator = self._iter_events()
119
120
 
120
- async for sse in iterator:
121
- yield process_data(data=sse.json(), cast_to=cast_to, response=response)
122
-
123
- # As we might not fully consume the response stream, we need to close it explicitly
124
- await response.aclose()
121
+ try:
122
+ async for sse in iterator:
123
+ yield process_data(data=sse.json(), cast_to=cast_to, response=response)
124
+ finally:
125
+ # Ensure the response is closed even if the consumer doesn't read all data
126
+ await response.aclose()
125
127
 
126
128
  async def __aenter__(self) -> Self:
127
129
  return self
anchorbrowser/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "anchorbrowser"
4
- __version__ = "0.3.9" # x-release-please-version
4
+ __version__ = "0.3.11" # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: anchorbrowser
3
- Version: 0.3.9
3
+ Version: 0.3.11
4
4
  Summary: The official Python library for the anchorbrowser API
5
5
  Project-URL: Homepage, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
6
6
  Project-URL: Repository, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
21
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
23
  Classifier: Typing :: Typed
23
24
  Requires-Python: >=3.9
@@ -9,9 +9,9 @@ anchorbrowser/_models.py,sha256=_qXPD2dQpvS5hqULjyh4V6J6ejhmMMnSkgCZx5BWZYc,3183
9
9
  anchorbrowser/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
10
10
  anchorbrowser/_resource.py,sha256=7lE1EgpVj5kwckk-27umtigTOf9nKTyRl97cgNwRbRQ,1142
11
11
  anchorbrowser/_response.py,sha256=xsiyWOC8LWW-NvbFtZ-MJD4f7eI9RnivKwtKImZ-8o4,28860
12
- anchorbrowser/_streaming.py,sha256=ageQnvSloL91I4OxR1GL6-V5sDa4A_99PX1Sgi-U7zY,10177
12
+ anchorbrowser/_streaming.py,sha256=ey2jst1hntYHV6HDiCFfHhWr_dUCSG4dG-VUqQkmCQ4,10249
13
13
  anchorbrowser/_types.py,sha256=hYSr4gk9908ZiGTqMX3pHhdzfzUUaHVelFS_I6p2Uj0,7243
14
- anchorbrowser/_version.py,sha256=JEgOtCTABcZt7ZyMKmJ-te7n0LMHmGhwTYno0oe_A2A,165
14
+ anchorbrowser/_version.py,sha256=e-P8z2qGaCaCjZs-bmnf99JVhIPfXxEepcubZDEa8ZQ,166
15
15
  anchorbrowser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  anchorbrowser/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  anchorbrowser/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -118,7 +118,7 @@ anchorbrowser/types/sessions/agent/file_upload_response.py,sha256=9DnqplfvEud89U
118
118
  anchorbrowser/types/sessions/recordings/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
119
119
  anchorbrowser/types/shared/__init__.py,sha256=FQKjY3VDxI8T0feNRazdY5TOqb2KDeEwZaoJjsxuEl4,152
120
120
  anchorbrowser/types/shared/success_response.py,sha256=l9OWrucXoSjBdsx5QKdvBPFtxv8d0YdpYY6iL5cWWuc,314
121
- anchorbrowser-0.3.9.dist-info/METADATA,sha256=S0BsTO-Yqb8g7BoZE605Ync9bQsIfXweqhTYX9TBhpE,15279
122
- anchorbrowser-0.3.9.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
123
- anchorbrowser-0.3.9.dist-info/licenses/LICENSE,sha256=QYTH6OztHxnELDn890vME8F7-euzmsHhWI4XOSYxwOg,11343
124
- anchorbrowser-0.3.9.dist-info/RECORD,,
121
+ anchorbrowser-0.3.11.dist-info/METADATA,sha256=fuXqyTBtofobQlqCpj5SJAkdrbtnDlWextw3Jz8Ce9Y,15331
122
+ anchorbrowser-0.3.11.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
123
+ anchorbrowser-0.3.11.dist-info/licenses/LICENSE,sha256=QYTH6OztHxnELDn890vME8F7-euzmsHhWI4XOSYxwOg,11343
124
+ anchorbrowser-0.3.11.dist-info/RECORD,,