Skip to content

Commit a4b244f

Browse files
release: 1.0.4 (#69)
* chore(internal): codegen related update (#68) * chore(internal): exclude mypy from running on tests (#70) * fix(client): compat with new httpx 0.28.0 release (#71) * release: 1.0.4 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent d515d04 commit a4b244f

File tree

8 files changed

+34
-15
lines changed

8 files changed

+34
-15
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.0.3"
2+
".": "1.0.4"
33
}

CHANGELOG.md

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

3+
## 1.0.4 (2024-11-29)
4+
5+
Full Changelog: [v1.0.3...v1.0.4](https://github.com/browserbase/sdk-python/compare/v1.0.3...v1.0.4)
6+
7+
### Bug Fixes
8+
9+
* **client:** compat with new httpx 0.28.0 release ([#71](https://github.com/browserbase/sdk-python/issues/71)) ([7b87947](https://github.com/browserbase/sdk-python/commit/7b87947d0cdf555c73a1527b3e396cd40175d0b4))
10+
11+
12+
### Chores
13+
14+
* **internal:** codegen related update ([#68](https://github.com/browserbase/sdk-python/issues/68)) ([3e4372e](https://github.com/browserbase/sdk-python/commit/3e4372ed8790e32850e1196c402e0023cd8a0f9d))
15+
* **internal:** exclude mypy from running on tests ([#70](https://github.com/browserbase/sdk-python/issues/70)) ([edd3628](https://github.com/browserbase/sdk-python/commit/edd3628710ed8f863bce5df336385dd6d380041e))
16+
317
## 1.0.3 (2024-11-22)
418

519
Full Changelog: [v1.0.2...v1.0.3](https://github.com/browserbase/sdk-python/compare/v1.0.2...v1.0.3)

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,14 @@ Note that requests that time out are [retried twice by default](#retries).
192192

193193
We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
194194

195-
You can enable logging by setting the environment variable `BROWSERBASE_LOG` to `debug`.
195+
You can enable logging by setting the environment variable `BROWSERBASE_LOG` to `info`.
196196

197197
```shell
198-
$ export BROWSERBASE_LOG=debug
198+
$ export BROWSERBASE_LOG=info
199199
```
200200

201+
Or to `debug` for more verbose logging.
202+
201203
### How to tell whether `None` means `null` or missing
202204

203205
In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:

mypy.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ show_error_codes = True
55
# Exclude _files.py because mypy isn't smart enough to apply
66
# the correct type narrowing and as this is an internal module
77
# it's fine to just use Pyright.
8-
exclude = ^(src/browserbase/_files\.py|_dev/.*\.py)$
8+
#
9+
# We also exclude our `tests` as mypy doesn't always infer
10+
# types correctly and Pyright will still catch any type errors.
11+
exclude = ^(src/browserbase/_files\.py|_dev/.*\.py|tests/.*)$
912

1013
strict_equality = True
1114
implicit_reexport = True

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "browserbase"
3-
version = "1.0.3"
3+
version = "1.0.4"
44
description = "The official Python library for the Browserbase API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -14,7 +14,6 @@ dependencies = [
1414
"anyio>=3.5.0, <5",
1515
"distro>=1.7.0, <2",
1616
"sniffio",
17-
"cached-property; python_version < '3.8'",
1817
]
1918
requires-python = ">= 3.8"
2019
classifiers = [

src/browserbase/_base_client.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ def __init__(
792792
custom_query: Mapping[str, object] | None = None,
793793
_strict_response_validation: bool,
794794
) -> None:
795+
kwargs: dict[str, Any] = {}
795796
if limits is not None:
796797
warnings.warn(
797798
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
@@ -804,6 +805,7 @@ def __init__(
804805
limits = DEFAULT_CONNECTION_LIMITS
805806

806807
if transport is not None:
808+
kwargs["transport"] = transport
807809
warnings.warn(
808810
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
809811
category=DeprecationWarning,
@@ -813,6 +815,7 @@ def __init__(
813815
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
814816

815817
if proxies is not None:
818+
kwargs["proxies"] = proxies
816819
warnings.warn(
817820
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
818821
category=DeprecationWarning,
@@ -856,10 +859,9 @@ def __init__(
856859
base_url=base_url,
857860
# cast to a valid type because mypy doesn't understand our type narrowing
858861
timeout=cast(Timeout, timeout),
859-
proxies=proxies,
860-
transport=transport,
861862
limits=limits,
862863
follow_redirects=True,
864+
**kwargs, # type: ignore
863865
)
864866

865867
def is_closed(self) -> bool:
@@ -1358,6 +1360,7 @@ def __init__(
13581360
custom_headers: Mapping[str, str] | None = None,
13591361
custom_query: Mapping[str, object] | None = None,
13601362
) -> None:
1363+
kwargs: dict[str, Any] = {}
13611364
if limits is not None:
13621365
warnings.warn(
13631366
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
@@ -1370,6 +1373,7 @@ def __init__(
13701373
limits = DEFAULT_CONNECTION_LIMITS
13711374

13721375
if transport is not None:
1376+
kwargs["transport"] = transport
13731377
warnings.warn(
13741378
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
13751379
category=DeprecationWarning,
@@ -1379,6 +1383,7 @@ def __init__(
13791383
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
13801384

13811385
if proxies is not None:
1386+
kwargs["proxies"] = proxies
13821387
warnings.warn(
13831388
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
13841389
category=DeprecationWarning,
@@ -1422,10 +1427,9 @@ def __init__(
14221427
base_url=base_url,
14231428
# cast to a valid type because mypy doesn't understand our type narrowing
14241429
timeout=cast(Timeout, timeout),
1425-
proxies=proxies,
1426-
transport=transport,
14271430
limits=limits,
14281431
follow_redirects=True,
1432+
**kwargs, # type: ignore
14291433
)
14301434

14311435
def is_closed(self) -> bool:

src/browserbase/_compat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ def __set_name__(self, owner: type[Any], name: str) -> None: ...
214214
# __set__ is not defined at runtime, but @cached_property is designed to be settable
215215
def __set__(self, instance: object, value: _T) -> None: ...
216216
else:
217-
try:
218-
from functools import cached_property as cached_property
219-
except ImportError:
220-
from cached_property import cached_property as cached_property
217+
from functools import cached_property as cached_property
221218

222219
typed_cached_property = cached_property

src/browserbase/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "browserbase"
4-
__version__ = "1.0.3" # x-release-please-version
4+
__version__ = "1.0.4" # x-release-please-version

0 commit comments

Comments
 (0)