Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.5.0-alpha.1"
".": "1.5.0-alpha.2"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 18
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-0b96e0120f7cf3fba797371433e15a08d14727c0526d718b728faee615624297.yml
openapi_spec_hash: 8d007eed388933bf9d74c5488a56be41
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-be7a4aeebb1605262935b4b3ab446a95b1fad8a7d18098943dd548c8a486ef13.yml
openapi_spec_hash: 1c950a109f80140711e7ae2cf87fddad
config_hash: b3ca4ec5b02e5333af51ebc2e9fdef1b
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 1.5.0-alpha.2 (2025-11-04)

Full Changelog: [v1.5.0-alpha.1...v1.5.0-alpha.2](https://github.com/browserbase/sdk-python/compare/v1.5.0-alpha.1...v1.5.0-alpha.2)

### Features

* **api:** api update ([97edfd0](https://github.com/browserbase/sdk-python/commit/97edfd04ce506478373c878b68cab3a8d6adc80d))


### Bug Fixes

* **client:** close streams without requiring full consumption ([bb617be](https://github.com/browserbase/sdk-python/commit/bb617bee85cc709ea14c4b53eac06058f28318e9))


### Chores

* bump `httpx-aiohttp` version to 0.1.9 ([42685a1](https://github.com/browserbase/sdk-python/commit/42685a189cf7a465d8696fbc8902123567f1e9e0))
* **internal/tests:** avoid race condition with implicit client cleanup ([6ca21dc](https://github.com/browserbase/sdk-python/commit/6ca21dcf117d076b9baaa43e0b1efd676c518845))
* **internal:** detect missing future annotations with ruff ([ea60157](https://github.com/browserbase/sdk-python/commit/ea60157e52c3f8477ecf20f2a39ec2a722c83fed))
* **internal:** grammar fix (it's -> its) ([1d6aebd](https://github.com/browserbase/sdk-python/commit/1d6aebda8211f3ffe1602420cfca5672d84561bd))

## 1.5.0-alpha.1 (2025-10-07)

Full Changelog: [v1.5.0-alpha.0...v1.5.0-alpha.1](https://github.com/browserbase/sdk-python/compare/v1.5.0-alpha.0...v1.5.0-alpha.1)
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "browserbase"
version = "1.5.0-alpha.1"
version = "1.5.0-alpha.2"
description = "The official Python library for the Browserbase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/browserbase/sdk-python"
Repository = "https://github.com/browserbase/sdk-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
Expand Down Expand Up @@ -233,6 +233,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -255,6 +257,8 @@ unfixable = [
"T203",
]

extend-safe-fixes = ["FA102"]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ httpx==0.28.1
# via browserbase
# via httpx-aiohttp
# via respx
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via browserbase
idna==3.10
# via anyio
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via browserbase
# via httpx-aiohttp
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via browserbase
idna==3.4
# via anyio
Expand Down
10 changes: 4 additions & 6 deletions src/browserbase/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]:
for sse in iterator:
yield process_data(data=sse.json(), cast_to=cast_to, response=response)

# Ensure the entire stream is consumed
for _sse in iterator:
...
# As we might not fully consume the response stream, we need to close it explicitly
response.close()

def __enter__(self) -> Self:
return self
Expand Down Expand Up @@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
async for sse in iterator:
yield process_data(data=sse.json(), cast_to=cast_to, response=response)

# Ensure the entire stream is consumed
async for _sse in iterator:
...
# As we might not fully consume the response stream, we need to close it explicitly
await response.aclose()

async def __aenter__(self) -> Self:
return self
Expand Down
2 changes: 1 addition & 1 deletion src/browserbase/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
# Type safe methods for narrowing types with TypeVars.
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
# however this cause Pyright to rightfully report errors. As we know we don't
# care about the contained types we can safely use `object` in it's place.
# care about the contained types we can safely use `object` in its place.
#
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
# `is_*` is for when you're dealing with an unknown input
Expand Down
2 changes: 1 addition & 1 deletion src/browserbase/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "browserbase"
__version__ = "1.5.0-alpha.1" # x-release-please-version
__version__ = "1.5.0-alpha.2" # x-release-please-version
8 changes: 0 additions & 8 deletions src/browserbase/resources/sessions/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def create(
extension_id: str | Omit = omit,
keep_alive: bool | Omit = omit,
proxies: Union[Iterable[session_create_params.ProxiesUnionMember0], bool] | Omit = omit,
proxy_settings: session_create_params.ProxySettings | Omit = omit,
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | Omit = omit,
api_timeout: int | Omit = omit,
user_metadata: Dict[str, object] | Omit = omit,
Expand Down Expand Up @@ -132,8 +131,6 @@ def create(
proxies: Proxy configuration. Can be true for default proxy, or an array of proxy
configurations.

proxy_settings: [NOT IN DOCS] Supplementary proxy settings. Optional.

region: The region where the Session should run.

api_timeout: Duration in seconds after which the session will automatically end. Defaults to
Expand All @@ -159,7 +156,6 @@ def create(
"extension_id": extension_id,
"keep_alive": keep_alive,
"proxies": proxies,
"proxy_settings": proxy_settings,
"region": region,
"api_timeout": api_timeout,
"user_metadata": user_metadata,
Expand Down Expand Up @@ -379,7 +375,6 @@ async def create(
extension_id: str | Omit = omit,
keep_alive: bool | Omit = omit,
proxies: Union[Iterable[session_create_params.ProxiesUnionMember0], bool] | Omit = omit,
proxy_settings: session_create_params.ProxySettings | Omit = omit,
region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"] | Omit = omit,
api_timeout: int | Omit = omit,
user_metadata: Dict[str, object] | Omit = omit,
Expand Down Expand Up @@ -407,8 +402,6 @@ async def create(
proxies: Proxy configuration. Can be true for default proxy, or an array of proxy
configurations.

proxy_settings: [NOT IN DOCS] Supplementary proxy settings. Optional.

region: The region where the Session should run.

api_timeout: Duration in seconds after which the session will automatically end. Defaults to
Expand All @@ -434,7 +427,6 @@ async def create(
"extension_id": extension_id,
"keep_alive": keep_alive,
"proxies": proxies,
"proxy_settings": proxy_settings,
"region": region,
"api_timeout": api_timeout,
"user_metadata": user_metadata,
Expand Down
9 changes: 0 additions & 9 deletions src/browserbase/types/session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"ProxiesUnionMember0UnionMember0",
"ProxiesUnionMember0UnionMember0Geolocation",
"ProxiesUnionMember0UnionMember1",
"ProxySettings",
]


Expand Down Expand Up @@ -50,9 +49,6 @@ class SessionCreateParams(TypedDict, total=False):
Can be true for default proxy, or an array of proxy configurations.
"""

proxy_settings: Annotated[ProxySettings, PropertyInfo(alias="proxySettings")]
"""[NOT IN DOCS] Supplementary proxy settings. Optional."""

region: Literal["us-west-2", "us-east-1", "eu-central-1", "ap-southeast-1"]
"""The region where the Session should run."""

Expand Down Expand Up @@ -212,8 +208,3 @@ class ProxiesUnionMember0UnionMember1(TypedDict, total=False):


ProxiesUnionMember0: TypeAlias = Union[ProxiesUnionMember0UnionMember0, ProxiesUnionMember0UnionMember1]


class ProxySettings(TypedDict, total=False):
ca_certificates: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="caCertificates")]]
"""[NOT IN DOCS] The TLS certificate IDs to trust. Optional."""
2 changes: 0 additions & 2 deletions tests/api_resources/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def test_method_create_with_all_params(self, client: Browserbase) -> None:
},
}
],
proxy_settings={"ca_certificates": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]},
region="us-west-2",
api_timeout=60,
user_metadata={"foo": "bar"},
Expand Down Expand Up @@ -327,7 +326,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncBrowserbas
},
}
],
proxy_settings={"ca_certificates": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]},
region="us-west-2",
api_timeout=60,
user_metadata={"foo": "bar"},
Expand Down
Loading