Skip to content

release: 0.37.1#261

Merged
gradenr merged 5 commits intomainfrom
release-please--branches--main--changes--next
Dec 4, 2025
Merged

release: 0.37.1#261
gradenr merged 5 commits intomainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Dec 3, 2025

Automated Release PR

0.37.1 (2025-12-04)

Full Changelog: v0.37.0...v0.37.1

Bug Fixes

Chores

  • docs: use environment variables for authentication in code snippets (3ed8c12)
  • update lockfile (f240076)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

Fix streaming hang by fully consuming SSE iterators; update docs to use env var auth; bump to 0.37.1.

  • Bug Fixes
    • Streaming (src/groq/_streaming.py): Ensure SSE streams are fully consumed after [DONE] by iterating remaining events (sync and async) to prevent hanging.
  • Docs
    • README: Use GROQ_API_KEY environment variable in examples (incl. aiohttp snippet).
  • Release/Metadata
    • Bump version to 0.37.1 in pyproject.toml, .release-please-manifest.json, and src/groq/_version.py.
    • Update .stats.yml OpenAPI spec URL.

Written by Cursor Bugbot for commit 06796ec. This will update automatically on new commits. Configure here.

@stainless-app
Copy link
Contributor Author

stainless-app bot commented Dec 3, 2025

🧪 Testing

To try out this version of the SDK, run:

pip install 'https://pkg.stainless.com/s/groqcloud-python/42fcb07bf0ce1f9910650410574e93ce05590260/groq-0.37.0-py3-none-any.whl'

Expires at: Sat, 03 Jan 2026 18:05:20 GMT
Updated at: Thu, 04 Dec 2025 18:05:20 GMT

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 6e7ff01 to 2b9b391 Compare December 3, 2025 08:00
dm-cohere and others added 2 commits December 4, 2025 10:04
Co-authored-by: Deirdre Meehan <deirdre.meehan@192.168.1.124>
Co-authored-by: Graden Rea <gradenr@users.noreply.github.com>
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 2b9b391 to 06796ec Compare December 4, 2025 18:04
@gradenr gradenr merged commit b03b94b into main Dec 4, 2025
13 checks passed
@gradenr gradenr deleted the release-please--branches--main--changes--next branch December 4, 2025 18:07
@stainless-app
Copy link
Contributor Author

stainless-app bot commented Dec 4, 2025

🤖 Release is at https://github.com/groq/groq-python/releases/tag/v0.37.1 🌻

yield process_data(data={"data": data, "event": sse.event}, cast_to=cast_to, response=response)
# The stream needs to be fully consumed to close the response
for _sse in iterator:
...
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Response resource leak when exception raised during stream iteration

The removal of the try/finally block that called response.close() (sync) and await response.aclose() (async) creates a resource leak when an APIError is raised during stream iteration. In the old code, the finally block ensured the response was always closed, even on exceptions. The new code only consumes remaining events via for _sse in iterator when the loop exits normally or breaks on [DONE], but this code is never reached if an exception is raised. Users iterating without a context manager will have unclosed responses when errors occur, potentially causing connection pool exhaustion or hanging.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants