Merged
Conversation
Add `delete_objects` method to both `Client` and `AsyncClient` that performs S3 multi-object delete via POST request with XML payload. Changes: - presigner.py: Add optional `query_string` param to `sign_request_headers` - _base.py: Add `_prepare_delete_objects` and `_parse_delete_objects_response` - client.py: Add POST support to `_execute_request` and `delete_objects` method - aio/client.py: Add POST support to `_execute_request` and `delete_objects` method - tests: Add sync and async tests for delete_objects Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com>
Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement delete_objects method
Implement delete_objects method
Mar 5, 2026
Member
|
Fix ruff format issues (line length) in source files and add delete_objects benchmarks to all 4 benchmark test files: - test_benchmark.py (sync) - test_benchmark_cm.py (sync context manager) - test_benchmark_aio.py (async) - test_benchmark_aio_cm.py (async context manager) Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com>
Contributor
Author
Fixed in 66a629b:
|
chaen
pushed a commit
that referenced
this pull request
Mar 5, 2026
* Initial plan * Implement delete_objects method for sync and async clients Add `delete_objects` method to both `Client` and `AsyncClient` that performs S3 multi-object delete via POST request with XML payload. Changes: - presigner.py: Add optional `query_string` param to `sign_request_headers` - _base.py: Add `_prepare_delete_objects` and `_parse_delete_objects_response` - client.py: Add POST support to `_execute_request` and `delete_objects` method - aio/client.py: Add POST support to `_execute_request` and `delete_objects` method - tests: Add sync and async tests for delete_objects Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com> * Fix XML injection vulnerability in delete_objects XML body construction Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com> * Fix pre-commit formatting and add delete_objects benchmarks Fix ruff format issues (line length) in source files and add delete_objects benchmarks to all 4 benchmark test files: - test_benchmark.py (sync) - test_benchmark_cm.py (sync context manager) - test_benchmark_aio.py (async) - test_benchmark_aio_cm.py (async context manager) Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: chrisburr <5220533+chrisburr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
delete_objectsto both syncClientand asyncAsyncClient, implementing the S3 multi-object delete API (POST /{bucket}?delete).Changes
presigner.py: Addquery_stringparam tosign_request_headersso?delete=is included in the SigV4 canonical request_base.py: Add_prepare_delete_objects(XML body construction, Content-MD5, signing) and_parse_delete_objects_response(XML response parsing with namespace handling)client.py/aio/client.py: AddPOSTto_execute_requestand publicdelete_objectsmethoddelete_objectsbenchmarks to all 4 benchmark test files (sync, sync CM, async, async CM)XML values are escaped via
xml.sax.saxutils.escapeto prevent injection.Usage
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.