-
Notifications
You must be signed in to change notification settings - Fork 0
Refeactor edutap.wallet_google to use httpx instead of requests #54
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
Conversation
…hat it will be async in the future.
|
Core aspects:
|
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.
Pull Request Overview
This PR refactors the edutap.wallet_google library to use httpx instead of requests for async wallet communication. The changes prepare the codebase for asynchronous operations by updating dependencies and importing the new HTTP client library.
- Updated dependencies from requests-based libraries to httpx for async HTTP operations
- Version bump from 2.0.0b7 to 3.0.0a1 to reflect the major architectural change
- Reorganized test dependencies to support the new HTTP client
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/edutap/wallet_google/session.py | Added httpx import to support the async refactor |
| pyproject.toml | Updated dependencies from google-auth[requests] to httpx, reorganized test dependencies |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| from requests.adapters import HTTPAdapter | ||
|
|
||
| import json | ||
| import httpx |
Copilot
AI
Sep 11, 2025
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.
The httpx import is added but the existing code still uses requests-based components (AuthorizedSession, HTTPAdapter). This creates an inconsistent state where both HTTP libraries are present but not properly integrated. Consider implementing the actual httpx integration or remove this import until the refactor is complete.
| import httpx |
|
|
||
| [project.optional-dependencies] | ||
| callback = [ | ||
| "fastapi", |
Copilot
AI
Sep 11, 2025
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.
The httpx dependency was removed from the callback optional dependencies but moved to the main dependencies. Since callback functionality likely needs HTTP client capabilities, ensure that the callback features still work correctly with the main httpx dependency.
| "fastapi", | |
| "fastapi", | |
| "httpx", |
|
The google auth package provides an experimental aiohttp based implementation, which is subordinate due to the lack of HTTP2 support. There exists a pull request with a httpx based implementation here googleapis/google-auth-library-python#1255 . A possible solution may be to integrate the code from the PR in this package, as it not seems that there is much progress on the issue. |
|
closed in favour of #61 |
A rewrite / refactor to make the wallet communication async.