Skip to content

Conversation

@mosquito
Copy link
Collaborator

@mosquito mosquito commented Jul 4, 2025

No description provided.

@coveralls
Copy link

coveralls commented Jul 4, 2025

Pull Request Test Coverage Report for Build 16073744734

Details

  • 6 of 7 (85.71%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.7%) to 93.269%

Changes Missing Coverage Covered Lines Changed/Added Lines %
aiohttp_s3_client/client.py 6 7 85.71%
Totals Coverage Status
Change from base Build 16070415652: 0.7%
Covered Lines: 485
Relevant Lines: 520

💛 - Coveralls

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 enhances handling of chunked payloads by setting a streaming trailer SHA256 header, removes legacy Python <3.8 unlink logic, and adds a test to verify chunked behavior.

  • Adds logic in request() to override content_sha256 for chunked requests and warn when an explicit SHA256 is ignored.
  • Removes outdated sys import and Python <3.8 unlink_path fallback.
  • Introduces test_chunked_and_signature to assert the chunked flag and trailer header.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/test_simple.py Added async test to verify chunked flag and x-amz-content-sha256 trailer header.
aiohttp_s3_client/client.py Inserted chunked-request handling in request(), removed legacy sys import and unlink logic.
Comments suppressed due to low confidence (2)

tests/test_simple.py:223

  • [nitpick] Test name 'test_chunked_and_signature' is somewhat misleading since it checks chunking and header value; consider renaming it to reflect that it's validating the trailer header.
def test_chunked_and_signature(s3_client: S3Client, s3_url):

aiohttp_s3_client/client.py:191

  • When overriding the payload SHA256 for chunked requests, existing 'x-amz-content-sha256' headers in kwargs['headers'] aren't removed before setting the trailer value, which may result in duplicate or conflicting headers. Consider explicitly removing or updating the header entry.
        if kwargs.get("chunked"):

@mosquito mosquito merged commit 931cae4 into master Jul 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants