Conversation
|
🧪 Testing To try out this version of the SDK, run: Expires at: Thu, 15 Jan 2026 17:32:23 GMT |
cf3e64a to
81409a0
Compare
81409a0 to
b5916d5
Compare
b5916d5 to
efb1b1d
Compare
efb1b1d to
90a010d
Compare
Release version edited manuallyThe Pull Request version has been manually set to If you instead want to use the version number |
90a010d to
4617767
Compare
|
🤖 Release is at https://github.com/whopio/whopsdk-python/releases/tag/v0.0.20 🌻 |
| from ..types.shared.business_types import BusinessTypes | ||
| from ..types.shared.industry_types import IndustryTypes |
There was a problem hiding this comment.
Bug: The async patch method calls the synchronous to_httpx_files function instead of awaiting the correct async_to_httpx_files function, unlike other async methods.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The AsyncAPIClient.patch method at src/whop_sdk/_base_client.py:1777 incorrectly calls the synchronous function to_httpx_files(files) within an async context. This is inconsistent with other async methods like post and put, which correctly await the async_to_httpx_files(files) coroutine. Calling the synchronous version can block the event loop and will not properly handle async file objects, leading to incorrect file handling or runtime errors when performing an async patch request with file uploads.
💡 Suggested Fix
In the AsyncAPIClient.patch method, change the call from to_httpx_files(files) to await async_to_httpx_files(files). This will ensure non-blocking, asynchronous file handling, consistent with the post and put async methods.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/whop_sdk/resources/companies.py#L26-L27
Potential issue: The `AsyncAPIClient.patch` method at
`src/whop_sdk/_base_client.py:1777` incorrectly calls the synchronous function
`to_httpx_files(files)` within an async context. This is inconsistent with other async
methods like `post` and `put`, which correctly `await` the `async_to_httpx_files(files)`
coroutine. Calling the synchronous version can block the event loop and will not
properly handle async file objects, leading to incorrect file handling or runtime errors
when performing an async patch request with file uploads.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7602218
Automated Release PR
0.0.20 (2025-12-16)
Full Changelog: v0.0.19...v0.0.20
Features
Chores
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