-
Notifications
You must be signed in to change notification settings - Fork 4.2k
release: 1.100.3 #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stainless-app
merged 2 commits into
main
from
release-please--branches--main--changes--next
Aug 20, 2025
Merged
release: 1.100.3 #2570
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- next | ||
|
||
jobs: | ||
detect_breaking_changes: | ||
runs-on: 'ubuntu-latest' | ||
name: detect-breaking-changes | ||
if: github.repository == 'openai/openai-python' | ||
steps: | ||
- name: Calculate fetch-depth | ||
run: | | ||
echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
# Ensure we can check out the pull request base in the script below. | ||
fetch-depth: ${{ env.FETCH_DEPTH }} | ||
|
||
- name: Install Rye | ||
run: | | ||
curl -sSf https://rye.astral.sh/get | bash | ||
echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
env: | ||
RYE_VERSION: '0.44.0' | ||
RYE_INSTALL_OPTION: '--yes' | ||
- name: Install dependencies | ||
run: | | ||
rye sync --all-features | ||
- name: Detect removed symbols | ||
run: | | ||
rye run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}" | ||
|
||
- name: Detect breaking changes | ||
run: | | ||
# Try to check out previous versions of the breaking change detection script. This ensures that | ||
# we still detect breaking changes when entire files and their tests are removed. | ||
git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true | ||
./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "1.100.2" | ||
".": "1.100.3" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
configured_endpoints: 111 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7ef7a457c3bf05364e66e48c9ca34f31bfef1f6c9b7c15b1812346105e0abb16.yml | ||
openapi_spec_hash: a2b1f5d8fbb62175c93b0ebea9f10063 | ||
config_hash: 76afa3236f36854a8705f1281b1990b8 | ||
config_hash: 4870312b04f48fd717ea4151053e7fb9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
echo "==> Detecting breaking changes" | ||
|
||
TEST_PATHS=( | ||
tests/api_resources | ||
tests/test_client.py | ||
tests/test_response.py | ||
tests/test_legacy_response.py | ||
) | ||
|
||
for PATHSPEC in "${TEST_PATHS[@]}"; do | ||
# Try to check out previous versions of the test files | ||
# with the current SDK. | ||
git checkout "$1" -- "${PATHSPEC}" 2>/dev/null || true | ||
done | ||
|
||
# Instead of running the tests, use the linter to check if an | ||
# older test is no longer compatible with the latest SDK. | ||
./scripts/lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
from typing import Iterator | ||
from pathlib import Path | ||
|
||
import rich | ||
import griffe | ||
from rich.text import Text | ||
from rich.style import Style | ||
|
||
|
||
def public_members(obj: griffe.Object | griffe.Alias) -> dict[str, griffe.Object | griffe.Alias]: | ||
if isinstance(obj, griffe.Alias): | ||
# ignore imports for now, they're technically part of the public API | ||
# but we don't have good preventative measures in place to prevent | ||
# changing them | ||
return {} | ||
|
||
return {name: value for name, value in obj.all_members.items() if not name.startswith("_")} | ||
|
||
|
||
def find_breaking_changes( | ||
new_obj: griffe.Object | griffe.Alias, | ||
old_obj: griffe.Object | griffe.Alias, | ||
*, | ||
path: list[str], | ||
) -> Iterator[Text | str]: | ||
new_members = public_members(new_obj) | ||
old_members = public_members(old_obj) | ||
|
||
for name, old_member in old_members.items(): | ||
if isinstance(old_member, griffe.Alias) and len(path) > 2: | ||
# ignore imports in `/types/` for now, they're technically part of the public API | ||
# but we don't have good preventative measures in place to prevent changing them | ||
continue | ||
|
||
new_member = new_members.get(name) | ||
if new_member is None: | ||
cls_name = old_member.__class__.__name__ | ||
yield Text(f"({cls_name})", style=Style(color="rgb(119, 119, 119)")) | ||
yield from [" " for _ in range(10 - len(cls_name))] | ||
yield f" {'.'.join(path)}.{name}" | ||
yield "\n" | ||
continue | ||
|
||
yield from find_breaking_changes(new_member, old_member, path=[*path, name]) | ||
|
||
|
||
def main() -> None: | ||
try: | ||
against_ref = sys.argv[1] | ||
except IndexError as err: | ||
raise RuntimeError("You must specify a base ref to run breaking change detection against") from err | ||
|
||
package = griffe.load( | ||
"openai", | ||
search_paths=[Path(__file__).parent.parent.joinpath("src")], | ||
) | ||
old_package = griffe.load_git( | ||
"openai", | ||
ref=against_ref, | ||
search_paths=["src"], | ||
) | ||
assert isinstance(package, griffe.Module) | ||
assert isinstance(old_package, griffe.Module) | ||
|
||
output = list(find_breaking_changes(package, old_package, path=["openai"])) | ||
if output: | ||
rich.print(Text("Breaking changes detected!", style=Style(color="rgb(165, 79, 87)"))) | ||
rich.print() | ||
|
||
for text in output: | ||
rich.print(text, end="") | ||
|
||
sys.exit(1) | ||
|
||
|
||
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__ = "openai" | ||
__version__ = "1.100.2" # x-release-please-version | ||
__version__ = "1.100.3" # x-release-please-version |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rye is deprecated. astral-sh/rye#1476