Skip to content

Conversation

@loechel
Copy link
Contributor

@loechel loechel commented Sep 11, 2025

A rewrite / refactor to make the wallet communication async.

@loechel loechel marked this pull request as draft September 11, 2025 10:08
@loechel loechel self-assigned this Sep 11, 2025
@loechel
Copy link
Contributor Author

loechel commented Sep 11, 2025

Core aspects:

  • all public api methodes will become async
  • the Session will be replaced with an httpx.AsyncClient
  • google-auth AuthenticatedSession needs to be replaced. (External Dependency)

@loechel loechel requested review from Copilot, jensens and zworkb and removed request for Copilot September 11, 2025 10:10
Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Sep 11, 2025

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.

Suggested change
import httpx

Copilot uses AI. Check for mistakes.

[project.optional-dependencies]
callback = [
"fastapi",
Copy link

Copilot AI Sep 11, 2025

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.

Suggested change
"fastapi",
"fastapi",
"httpx",

Copilot uses AI. Check for mistakes.
@rnixx
Copy link
Contributor

rnixx commented Sep 26, 2025

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.

@loechel
Copy link
Contributor Author

loechel commented Oct 6, 2025

closed in favour of #61

@loechel loechel closed this Oct 6, 2025
@jensens jensens deleted the httpx branch October 6, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants