GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: use .read() instead of .content.read() in aiohttp transport by google-labs-jules[bot] · Pull Request #1899 · googleapis/google-auth-library-python

This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Conversation

@google-labs-jules

@google-labs-jules google-labs-jules Bot commented Dec 19, 2025 •
edited by chalmerlowe
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes issue where response content is empty when using aiohttp-client-cache by using response.read() instead of response.content.read().

Rationale:
In aiohttp, .read() is the standard, high-level method for reading the full response body. It correctly handles internal state (like caching the body for subsequent calls), which is essential for compatibility with wrappers like aiohttp-client-cache. Accessing .content.read() directly bypasses this logic, leading to empty responses when the stream has already been consumed or intercepted by the caching layer.

Benefits:

  • Robustness: Ensures correct behavior when google-auth is used in conjunction with aiohttp wrappers or middleware.
  • Standards: Aligns with aiohttp best practices for consuming response bodies.

Risk Mitigation:

  • Behavior: _CombinedResponse is designed to load the full response into memory. Changing to .read() preserves this behavior exactly; it just uses a safer accessor.
  • Performance: Since aiohttp's .read() returns a reference to the bytes, there is no additional memory overhead compared to the previous implementation.
  • Internal: This change is internal to the transport adapter and does not alter the public API or behavior for users not using caching libraries.

PR created automatically by Jules for task 3355868403646689815 started by @chalmerlowe

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@google-labs-jules
fix: use .read() instead of .content.read() in aiohttp transport
87e0959
Using .read() is more robust when working with caching libraries like
aiohttp-client-cache, which may cause .content.read() to return empty
bytes on subsequent reads. .read() ensures the full body is returned.

Fixes #1248
@google-labs-jules

google-labs-jules Bot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-labs-jules
fix: use .read() instead of .content.read() in aiohttp transport
9485c59
Using .read() is more robust when working with caching libraries like
aiohttp-client-cache, which may cause .content.read() to return empty
bytes on subsequent reads. .read() ensures the full body is returned.

Fixes #1248
@chalmerlowe
chalmerlowe marked this pull request as ready for review December 19, 2025 21:04
@chalmerlowe
chalmerlowe requested review from a team December 19, 2025 21:04
@chalmerlowe chalmerlowe mentioned this pull request Dec 19, 2025
Fix: response content is empty when using cache #1248
Closed
@chalmerlowe chalmerlowe self-assigned this Dec 19, 2025
@chalmerlowe chalmerlowe added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 19, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 19, 2025
chalmerlowe
chalmerlowe approved these changes Dec 19, 2025
View reviewed changes

@chalmerlowe chalmerlowe left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
daniel-sanche
daniel-sanche approved these changes Dec 19, 2025
View reviewed changes

@daniel-sanche daniel-sanche left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chalmerlowe
Merge branch 'main' into fix-aiohttp-cache-empty-response-33558684036…
87bbe7c
…46689815
@chalmerlowe chalmerlowe added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 22, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 22, 2025
@chalmerlowe

chalmerlowe commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Temporarily removing the requirement for system-3.10 to pass due to a known issue with that CI/CD check that is being addressed in an separate PR #1901

google-labs-jules[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-labs-jules

google-labs-jules Bot commented Dec 22, 2025

Copy link
Copy Markdown
Contributor Author

Temporarily removing the requirement for system-3.10 to pass due to a known issue with that CI/CD check that is being addressed in an separate PR #1901

Acknowledged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chalmerlowe
chalmerlowe merged commit 12f4470 into main Dec 22, 2025
@chalmerlowe
chalmerlowe deleted the fix-aiohttp-cache-empty-response-3355868403646689815 branch December 22, 2025 18:26
@daniel-sanche daniel-sanche mentioned this pull request Jan 5, 2026
chore: librarian release pull request: 20260105T122553Z #1913
Merged
daniel-sanche added a commit that referenced this pull request Jan 5, 2026
@daniel-sanche
chore: librarian release pull request: 20260105T122553Z (#1913)
2cbc2a2
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v1.0.1
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
<details><summary>google-auth: 2.46.0</summary>

##
[2.46.0](v2.45.0...v2.46.0)
(2026-01-05)

### Features

* Recognize workload certificate config in
has_default_client_cert_source for mTLS for Agentic Identities (#1907)
([0b9107d](0b9107d5))

### Bug Fixes

* Fix test coverage for mtls_helper (#1886)
([02e7163](02e71631))

* use .read() instead of .content.read() in aiohttp transport (#1899)
([12f4470](12f4470f))

* add types to default and verify_token and Request __init__ based on
comments in the source code. (#1588)
([59a5f58](59a5f588))

* fix the document of secure_authorized_session (#1536)
([5d00147](5d001470))

* raise RefreshError for missing token in impersonated credentials
(#1897)
([94d04e0](94d04e09))

* remove setup.cfg configuration for creating universal wheels (#1693)
([c767531](c767531c))

### Documentation

* update urllib3 docstrings for v2 compatibility (#1903)
([3f1aeea](3f1aeea2))

</details>
@coderabbitai coderabbitai Bot mentioned this pull request May 28, 2026
feat: add native vertex_dedicated provider for self-deployed Vertex AI endpoints arin-deloatch/rhel-lightspeed-evaluation#13
Merged
4 tasks done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@daniel-sanche daniel-sanche daniel-sanche approved these changes
@chalmerlowe chalmerlowe chalmerlowe approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@chalmerlowe chalmerlowe

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@chalmerlowe @daniel-sanche @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.