Skip to content

Conversation

@mosquito
Copy link
Collaborator

This pull request introduces a new manual multipart upload interface to the S3 client, allowing users fine-grained control over multipart uploads, including part size, metadata, and concurrency. It also refactors the internal multipart upload implementation to use this new interface, simplifying the upload process and improving reliability.

The most important changes are:

New Manual Multipart Upload API:

  • Added the MultipartUploader class to aiohttp_s3_client/client.py, providing an async context manager for manual multipart uploads. This class allows users to control part uploads, manage retries, and handle upload completion.
  • Exposed a new multipart_upload method on S3Client to obtain a MultipartUploader for a given object.
  • Updated the README.md with detailed documentation and usage examples for the new manual multipart upload API, including best practices and concurrency patterns.

Refactoring Internal Multipart Uploads:

  • Refactored the internal multipart upload logic in put_multipart and related methods to use the new MultipartUploader, simplifying part number assignment, retry handling, and upload completion.
  • Simplified the part upload worker logic to operate on coroutines returned by put_part, improving concurrency and error handling.

@coveralls
Copy link

coveralls commented Dec 17, 2025

Pull Request Test Coverage Report for Build 20317889621

Details

  • 86 of 94 (91.49%) changed or added relevant lines in 1 file are covered.
  • 13 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-3.0%) to 90.311%

Changes Missing Coverage Covered Lines Changed/Added Lines %
aiohttp_s3_client/client.py 86 94 91.49%
Files with Coverage Reduction New Missed Lines %
aiohttp_s3_client/client.py 13 90.63%
Totals Coverage Status
Change from base Build 16074067925: -3.0%
Covered Lines: 522
Relevant Lines: 578

💛 - Coveralls

@mosquito mosquito force-pushed the feature/multipart-manual-upload branch from 8257274 to 6b3c371 Compare December 17, 2025 21:30
@mosquito mosquito merged commit 7ecb52f into master Dec 18, 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.

5 participants