Skip to content

Commit 89e7f0d

Browse files
release: 1.4.0 (#150)
* chore(internal): bump pyright version * chore(internal): base client updates * chore(internal): update models test * chore(ci): add timeout thresholds for CI jobs * chore(internal): import reformatting * chore(internal): fix list file params * chore(internal): refactor retries to not use recursion * fix(pydantic v1): more robust ModelField.annotation check * chore(internal): minor formatting changes * chore(internal): codegen related update * chore(ci): only use depot for staging repos * chore: broadly detect json family of content-type headers * chore(internal): avoid errors for isinstance checks on proxies * fix(package): support direct resource imports * chore(ci): upload sdks to package manager * chore(ci): fix installation instructions * feat(api): api update * release: 1.4.0 * Remove rule that fails lint --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: ajmcquilkin <[email protected]>
1 parent 7d04401 commit 89e7f0d

31 files changed

+389
-293
lines changed

.github/workflows/ci.yml

+34-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
9-
- next
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
1010

1111
jobs:
1212
lint:
13+
timeout-minutes: 10
1314
name: lint
14-
runs-on: ubuntu-latest
15+
runs-on: ${{ github.repository == 'stainless-sdks/browserbase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
1516
steps:
1617
- uses: actions/checkout@v4
1718

@@ -29,9 +30,34 @@ jobs:
2930
- name: Run lints
3031
run: ./scripts/lint
3132

33+
upload:
34+
if: github.repository == 'stainless-sdks/browserbase-python'
35+
timeout-minutes: 10
36+
name: upload
37+
permissions:
38+
contents: read
39+
id-token: write
40+
runs-on: depot-ubuntu-24.04
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Get GitHub OIDC Token
45+
id: github-oidc
46+
uses: actions/github-script@v6
47+
with:
48+
script: core.setOutput('github_token', await core.getIDToken());
49+
50+
- name: Upload tarball
51+
env:
52+
URL: https://pkg.stainless.com/s
53+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
54+
SHA: ${{ github.sha }}
55+
run: ./scripts/utils/upload-artifact.sh
56+
3257
test:
58+
timeout-minutes: 10
3359
name: test
34-
runs-on: ubuntu-latest
60+
runs-on: ${{ github.repository == 'stainless-sdks/browserbase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
3561
steps:
3662
- uses: actions/checkout@v4
3763

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.3.0"
2+
".": "1.4.0"
33
}

.stats.yml

+2-2
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-45328621800082e652c9b2f34b176b89ebba3af423ea9f4fed91a359cf4e0ae4.yml
3-
openapi_spec_hash: c20658b49312b14d158ce5c88f34ee34
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-e2ed1b5267eeff92982918505349017b9155da2c7ab948787ab11cf9068af1b8.yml
3+
openapi_spec_hash: 6639c21dccb52ca610cae833227a9791
44
config_hash: 74882e23a455dece33e43a27e67f0fbb

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

3+
## 1.4.0 (2025-05-16)
4+
5+
Full Changelog: [v1.3.0...v1.4.0](https://github.com/browserbase/sdk-python/compare/v1.3.0...v1.4.0)
6+
7+
### Features
8+
9+
* **api:** api update ([d3b2ee1](https://github.com/browserbase/sdk-python/commit/d3b2ee1e3c69efbdcb2f0e53b4625e2c8a2a7430))
10+
11+
12+
### Bug Fixes
13+
14+
* **package:** support direct resource imports ([8feb502](https://github.com/browserbase/sdk-python/commit/8feb502c7e73e8abed43afae5a0526282c4f0dfe))
15+
* **pydantic v1:** more robust ModelField.annotation check ([5292730](https://github.com/browserbase/sdk-python/commit/5292730dd7b1585210d7ab8e640ed78a5dd9740a))
16+
17+
18+
### Chores
19+
20+
* broadly detect json family of content-type headers ([ffe29f8](https://github.com/browserbase/sdk-python/commit/ffe29f8dc99d5e7462a0a9bbd488c368e836acdc))
21+
* **ci:** add timeout thresholds for CI jobs ([3ca4458](https://github.com/browserbase/sdk-python/commit/3ca4458cf31650ce8749c56bee4549811cadec1f))
22+
* **ci:** fix installation instructions ([99a7328](https://github.com/browserbase/sdk-python/commit/99a7328f22f6da3cd96d70b00c2a6fa0d4c82b37))
23+
* **ci:** only use depot for staging repos ([646f7d8](https://github.com/browserbase/sdk-python/commit/646f7d832f269d383a0da5fe5732a52ec10787b2))
24+
* **ci:** upload sdks to package manager ([ff18efd](https://github.com/browserbase/sdk-python/commit/ff18efdf051eabcb52863739942b652d86ed2231))
25+
* **internal:** avoid errors for isinstance checks on proxies ([b33d222](https://github.com/browserbase/sdk-python/commit/b33d222fd5fdd6eaaca62fb6eb6d9f878a01d31d))
26+
* **internal:** base client updates ([44f575e](https://github.com/browserbase/sdk-python/commit/44f575efd621315d9bd28e7921554980045af6ed))
27+
* **internal:** bump pyright version ([bb6bbd3](https://github.com/browserbase/sdk-python/commit/bb6bbd36b3b0fb7595bcc6bd9b25c0aafd6a08af))
28+
* **internal:** codegen related update ([9f4f8d1](https://github.com/browserbase/sdk-python/commit/9f4f8d1172d5c4b9fa36c8c97ab6e10958ff2959))
29+
* **internal:** fix list file params ([74b3df7](https://github.com/browserbase/sdk-python/commit/74b3df7160585d981ff5390b6f354926188aaa2a))
30+
* **internal:** import reformatting ([bba19e4](https://github.com/browserbase/sdk-python/commit/bba19e44eb67116740b27e1fea04abe06a97e4cd))
31+
* **internal:** minor formatting changes ([0c58843](https://github.com/browserbase/sdk-python/commit/0c58843c75075e3803c9a5a9790f48558a78e712))
32+
* **internal:** refactor retries to not use recursion ([4161fdb](https://github.com/browserbase/sdk-python/commit/4161fdbcf76a18deee8b790944369225fb4331ff))
33+
* **internal:** update models test ([5e5dc11](https://github.com/browserbase/sdk-python/commit/5e5dc11c53c60164829b145762818545cfe36f52))
34+
335
## 1.3.0 (2025-04-15)
436

537
Full Changelog: [v1.2.0...v1.3.0](https://github.com/browserbase/sdk-python/compare/v1.2.0...v1.3.0)

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ session = client.sessions.create(
104104
browser_settings={
105105
"advanced_stealth": True,
106106
"block_ads": True,
107+
"captcha_image_selector": "captchaImageSelector",
108+
"captcha_input_selector": "captchaInputSelector",
107109
"context": {
108110
"id": "id",
109111
"persist": True,

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "browserbase"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
description = "The official Python library for the Browserbase API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -42,7 +42,7 @@ Repository = "https://github.com/browserbase/sdk-python"
4242
managed = true
4343
# version pins are in requirements-dev.lock
4444
dev-dependencies = [
45-
"pyright>=1.1.359",
45+
"pyright==1.1.399",
4646
"mypy",
4747
"respx",
4848
"pytest",
@@ -185,7 +185,7 @@ select = [
185185
"T201",
186186
"T203",
187187
# misuse of typing.TYPE_CHECKING
188-
"TC004",
188+
# "TC004", # fails lint
189189
# import rules
190190
"TID251",
191191
]

requirements-dev.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ pyee==12.0.0
8989
# via playwright
9090
pygments==2.18.0
9191
# via rich
92-
pyright==1.1.392.post0
9392
pysocks==1.7.1
9493
# via urllib3
94+
pyright==1.1.399
9595
pytest==8.3.3
9696
# via pytest-asyncio
9797
# via pytest-base-url

scripts/utils/upload-artifact.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
set -exuo pipefail
3+
4+
RESPONSE=$(curl -X POST "$URL" \
5+
-H "Authorization: Bearer $AUTH" \
6+
-H "Content-Type: application/json")
7+
8+
SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url')
9+
10+
if [[ "$SIGNED_URL" == "null" ]]; then
11+
echo -e "\033[31mFailed to get signed URL.\033[0m"
12+
exit 1
13+
fi
14+
15+
UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \
16+
-H "Content-Type: application/gzip" \
17+
--data-binary @- "$SIGNED_URL" 2>&1)
18+
19+
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
20+
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
21+
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/browserbase-python/$SHA'\033[0m"
22+
else
23+
echo -e "\033[31mFailed to upload artifact.\033[0m"
24+
exit 1
25+
fi

src/browserbase/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
import typing as _t
4+
35
from . import types
46
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
57
from ._utils import file_from_path
@@ -78,6 +80,9 @@
7880
"DefaultAsyncHttpxClient",
7981
]
8082

83+
if not _t.TYPE_CHECKING:
84+
from ._utils._resources_proxy import resources as resources
85+
8186
_setup_logging()
8287

8388
# Update the __module__ attribute for exported symbols so that

0 commit comments

Comments
 (0)