Repository navigation
Conversation
Use return_exceptions with asyncio.gather so a failed chunk's error is not raised while other chunk uploads are still in flight.
Replaces asyncio.gather/to_thread with anyio task groups and to_thread.run_sync. Retired HTTP clients are now closed in aclose() since anyio has no fire-and-forget tasks. Adds anyio dependency.
Emit warnings in a scoped context so caller filters are preserved. Add tests for sync and async decorators, warning attribution, and filter restoration.
|
This library is auto-generated by the Appwrite SDK Generator, and does not accept pull requests directly. To learn more about how you can help us improve this SDK, please check the contributing guide. |
🔵 Tier A · Mergeable after minor fixes
The SDK now exposes asynchronous service methods backed by an HTTPX2 async client, with explicit client shutdown and async file-upload support. The README, package requirements, and tests were updated for async usage. 58 of 74 changed files were too large to include in full.
Note @Xharry01X does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve.
Fix with agent prompt### Issue 1
appwrite/client.py:44
**Use a mock transport compatible with HTTPX2**
The service and client tests still use `respx`, which patches `httpx.AsyncClient` transports, while this constructs `httpx2.AsyncClient`; those requests bypass the mocks and can hit the default Appwrite endpoint. The tests also provide `httpx2.Response` objects where respx expects `httpx.Response`, so switch to a mock transport supported by HTTPX2 or adapt the test setup.
### Issue 2
README.md:135
**Put the error-handling example inside a coroutine**
This block shows `await` at module scope, which raises `SyntaxError` in a normal Python script. Wrap the example in `async def` and invoke it with `asyncio.run`, as in the request example above.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 7
Reviewed |
|
|
||
| def _new_http_client(self, verify): | ||
| context = _default_ssl_context() if verify else False | ||
| return httpx2.AsyncClient(verify=context, timeout=None) |
There was a problem hiding this comment.
Use a mock transport compatible with HTTPX2
The service and client tests still use respx, which patches httpx.AsyncClient transports, while this constructs httpx2.AsyncClient; those requests bypass the mocks and can hit the default Appwrite endpoint. The tests also provide httpx2.Response objects where respx expects httpx.Response, so switch to a mock transport supported by HTTPX2 or adapt the test setup.
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/client.py
Line: 44
Comment:
**Use a mock transport compatible with HTTPX2**
The service and client tests still use `respx`, which patches `httpx.AsyncClient` transports, while this constructs `httpx2.AsyncClient`; those requests bypass the mocks and can hit the default Appwrite endpoint. The tests also provide `httpx2.Response` objects where respx expects `httpx.Response`, so switch to a mock transport supported by HTTPX2 or adapt the test setup.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · testing · Reply if this doesn't apply.
|
|
||
| try: | ||
| user = users.get(user_id='<USER_ID>') | ||
| user = await users.get(user_id='<USER_ID>') |
There was a problem hiding this comment.
Put the error-handling example inside a coroutine
This block shows await at module scope, which raises SyntaxError in a normal Python script. Wrap the example in async def and invoke it with asyncio.run, as in the request example above.
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 135
Comment:
**Put the error-handling example inside a coroutine**
This block shows `await` at module scope, which raises `SyntaxError` in a normal Python script. Wrap the example in `async def` and invoke it with `asyncio.run`, as in the request example above.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · documentation · Reply if this doesn't apply.
Go through all the code and test hope you guys allow this. This needs to be in python sdk