Skip to content

Commit f6e0241

Browse files
release: 1.5.0-alpha.1 (#154)
* codegen metadata * chore(internal): move mypy configurations to `pyproject.toml` file * feat(api): api update * chore(tests): simplify `get_platform` test `nest_asyncio` is archived and broken on some platforms so it's not worth keeping in our test suite. * chore(internal): update pydantic dependency * chore(types): change optional parameter type from NotGiven to Omit * chore: do not install brew dependencies in ./scripts/bootstrap by default * feat(api): manual updates * release: 1.5.0-alpha.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 99c8f40 commit f6e0241

29 files changed

+254
-227
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.5.0-alpha.0"
2+
".": "1.5.0-alpha.1"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-a9ab6f9017f7645722d220eb8172516a7a5400e86542c28fc7e121adcd1f344f.yml
3-
openapi_spec_hash: e29347aba2697d4efa3dce7794810dbd
4-
config_hash: ec077c0d8cde29588ca4ff30d49575a4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-0b96e0120f7cf3fba797371433e15a08d14727c0526d718b728faee615624297.yml
3+
openapi_spec_hash: 8d007eed388933bf9d74c5488a56be41
4+
config_hash: b3ca4ec5b02e5333af51ebc2e9fdef1b

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## 1.5.0-alpha.1 (2025-10-07)
4+
5+
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)
6+
7+
### Features
8+
9+
* **api:** api update ([3bdf24e](https://github.com/browserbase/sdk-python/commit/3bdf24e69fd14e6e488af830e6e5a7786c21640d))
10+
* **api:** manual updates ([99b1cfb](https://github.com/browserbase/sdk-python/commit/99b1cfb41a51af014f5c350f0850331cd73abf08))
11+
12+
13+
### Chores
14+
15+
* do not install brew dependencies in ./scripts/bootstrap by default ([6915700](https://github.com/browserbase/sdk-python/commit/69157006cc0df8f9e5effd0f53d79df88fe14e7d))
16+
* **internal:** move mypy configurations to `pyproject.toml` file ([545938f](https://github.com/browserbase/sdk-python/commit/545938fde4ace7142c413f9e0ac25e3b9c717980))
17+
* **internal:** update pydantic dependency ([4dcad8e](https://github.com/browserbase/sdk-python/commit/4dcad8e96f1220e79f3e9b5cdee2e19dfb5a1e11))
18+
* **tests:** simplify `get_platform` test ([6421017](https://github.com/browserbase/sdk-python/commit/64210177c60ca05c5d0eead33c3ecee3f4d18718))
19+
* **types:** change optional parameter type from NotGiven to Omit ([a46d293](https://github.com/browserbase/sdk-python/commit/a46d293766d0eb89b93739af0fbbd038eea083bd))
20+
321
## 1.5.0-alpha.0 (2025-09-05)
422

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

mypy.ini

Lines changed: 0 additions & 50 deletions
This file was deleted.

pyproject.toml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "browserbase"
3-
version = "1.5.0-alpha.0"
3+
version = "1.5.0-alpha.1"
44
description = "The official Python library for the Browserbase API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -57,7 +57,6 @@ dev-dependencies = [
5757
"dirty-equals>=0.6.0",
5858
"importlib-metadata>=6.7.0",
5959
"rich>=13.7.1",
60-
"nest_asyncio==1.6.0",
6160
"pytest-xdist>=3.6.1",
6261
"python-dotenv",
6362
"playwright",
@@ -166,6 +165,58 @@ reportOverlappingOverload = false
166165
reportImportCycles = false
167166
reportPrivateUsage = false
168167

168+
[tool.mypy]
169+
pretty = true
170+
show_error_codes = true
171+
172+
# Exclude _files.py because mypy isn't smart enough to apply
173+
# the correct type narrowing and as this is an internal module
174+
# it's fine to just use Pyright.
175+
#
176+
# We also exclude our `tests` as mypy doesn't always infer
177+
# types correctly and Pyright will still catch any type errors.
178+
exclude = ['src/browserbase/_files.py', '_dev/.*.py', 'tests/.*']
179+
180+
strict_equality = true
181+
implicit_reexport = true
182+
check_untyped_defs = true
183+
no_implicit_optional = true
184+
185+
warn_return_any = true
186+
warn_unreachable = true
187+
warn_unused_configs = true
188+
189+
# Turn these options off as it could cause conflicts
190+
# with the Pyright options.
191+
warn_unused_ignores = false
192+
warn_redundant_casts = false
193+
194+
disallow_any_generics = true
195+
disallow_untyped_defs = true
196+
disallow_untyped_calls = true
197+
disallow_subclassing_any = true
198+
disallow_incomplete_defs = true
199+
disallow_untyped_decorators = true
200+
cache_fine_grained = true
201+
202+
# By default, mypy reports an error if you assign a value to the result
203+
# of a function call that doesn't return anything. We do this in our test
204+
# cases:
205+
# ```
206+
# result = ...
207+
# assert result is None
208+
# ```
209+
# Changing this codegen to make mypy happy would increase complexity
210+
# and would not be worth it.
211+
disable_error_code = "func-returns-value,overload-cannot-match"
212+
213+
# https://github.com/python/mypy/issues/12162
214+
[[tool.mypy.overrides]]
215+
module = "black.files.*"
216+
ignore_errors = true
217+
ignore_missing_imports = true
218+
219+
169220
[tool.ruff]
170221
line-length = 120
171222
output-format = "grouped"

requirements-dev.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ multidict==6.6.4
8888
mypy==1.14.1
8989
mypy-extensions==1.0.0
9090
# via mypy
91-
nest-asyncio==1.6.0
9291
nodeenv==1.9.1
9392
# via pyright
9493
nox==2024.10.9
@@ -106,9 +105,9 @@ pluggy==1.5.0
106105
propcache==0.3.2
107106
# via aiohttp
108107
# via yarl
109-
pydantic==2.10.3
108+
pydantic==2.11.9
110109
# via browserbase
111-
pydantic-core==2.27.1
110+
pydantic-core==2.33.2
112111
# via pydantic
113112
pyee==12.0.0
114113
# via playwright
@@ -168,6 +167,9 @@ typing-extensions==4.12.2
168167
# via pydantic-core
169168
# via pyee
170169
# via pyright
170+
# via typing-inspection
171+
typing-inspection==0.4.1
172+
# via pydantic
171173
# via rich
172174
# via selenium
173175
urllib3==2.2.3

requirements.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ multidict==6.4.4
5555
propcache==0.3.1
5656
# via aiohttp
5757
# via yarl
58-
pydantic==2.10.3
58+
pydantic==2.11.9
5959
# via browserbase
60-
pydantic-core==2.27.1
60+
pydantic-core==2.33.2
6161
# via pydantic
6262
sniffio==1.3.0
6363
# via anyio
@@ -68,5 +68,8 @@ typing-extensions==4.12.2
6868
# via multidict
6969
# via pydantic
7070
# via pydantic-core
71+
# via typing-inspection
72+
typing-inspection==0.4.1
73+
# via pydantic
7174
yarl==1.20.0
7275
# via aiohttp

scripts/bootstrap

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
88
brew bundle check >/dev/null 2>&1 || {
9-
echo "==> Installing Homebrew dependencies…"
10-
brew bundle
9+
echo -n "==> Install Homebrew dependencies? (y/N): "
10+
read -r response
11+
case "$response" in
12+
[yY][eE][sS]|[yY])
13+
brew bundle
14+
;;
15+
*)
16+
;;
17+
esac
18+
echo
1119
}
1220
fi
1321

src/browserbase/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import typing as _t
44

55
from . import types
6-
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
6+
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
77
from ._utils import file_from_path
88
from ._client import (
99
Client,
@@ -48,7 +48,9 @@
4848
"ProxiesTypes",
4949
"NotGiven",
5050
"NOT_GIVEN",
51+
"not_given",
5152
"Omit",
53+
"omit",
5254
"BrowserbaseError",
5355
"APIError",
5456
"APIStatusError",

src/browserbase/_base_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
from ._qs import Querystring
4343
from ._files import to_httpx_files, async_to_httpx_files
4444
from ._types import (
45-
NOT_GIVEN,
4645
Body,
4746
Omit,
4847
Query,
@@ -57,6 +56,7 @@
5756
RequestOptions,
5857
HttpxRequestFiles,
5958
ModelBuilderProtocol,
59+
not_given,
6060
)
6161
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
6262
from ._compat import PYDANTIC_V1, model_copy, model_dump
@@ -145,9 +145,9 @@ def __init__(
145145
def __init__(
146146
self,
147147
*,
148-
url: URL | NotGiven = NOT_GIVEN,
149-
json: Body | NotGiven = NOT_GIVEN,
150-
params: Query | NotGiven = NOT_GIVEN,
148+
url: URL | NotGiven = not_given,
149+
json: Body | NotGiven = not_given,
150+
params: Query | NotGiven = not_given,
151151
) -> None:
152152
self.url = url
153153
self.json = json
@@ -595,7 +595,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques
595595
# we internally support defining a temporary header to override the
596596
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
597597
# see _response.py for implementation details
598-
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
598+
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
599599
if is_given(override_cast_to):
600600
options.headers = headers
601601
return cast(Type[ResponseT], override_cast_to)
@@ -825,7 +825,7 @@ def __init__(
825825
version: str,
826826
base_url: str | URL,
827827
max_retries: int = DEFAULT_MAX_RETRIES,
828-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
828+
timeout: float | Timeout | None | NotGiven = not_given,
829829
http_client: httpx.Client | None = None,
830830
custom_headers: Mapping[str, str] | None = None,
831831
custom_query: Mapping[str, object] | None = None,
@@ -1356,7 +1356,7 @@ def __init__(
13561356
base_url: str | URL,
13571357
_strict_response_validation: bool,
13581358
max_retries: int = DEFAULT_MAX_RETRIES,
1359-
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
1359+
timeout: float | Timeout | None | NotGiven = not_given,
13601360
http_client: httpx.AsyncClient | None = None,
13611361
custom_headers: Mapping[str, str] | None = None,
13621362
custom_query: Mapping[str, object] | None = None,
@@ -1818,8 +1818,8 @@ def make_request_options(
18181818
extra_query: Query | None = None,
18191819
extra_body: Body | None = None,
18201820
idempotency_key: str | None = None,
1821-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1822-
post_parser: PostParser | NotGiven = NOT_GIVEN,
1821+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1822+
post_parser: PostParser | NotGiven = not_given,
18231823
) -> RequestOptions:
18241824
"""Create a dict of type RequestOptions without keys of NotGiven values."""
18251825
options: RequestOptions = {}

0 commit comments

Comments
 (0)