Repository navigation
Preserve S3 object keys and close downloaded bodies - #1686
Merged
Merged
Conversation
Afloat16
force-pushed
the
fix/s3-raw-keys-and-streams
branch
from
November 9, 2026 12:23
dd257fc to
45377d2
Compare
Afloat16
force-pushed
the
fix/s3-raw-keys-and-streams
branch
from
November 9, 2026 12:45
45377d2 to
cfbde17
Compare
Flask 3 supplies Werkzeug Headers to the API routes. Include that existing input alongside the dictionary used by gRPC in the validate annotation. Keep the optional header type under TYPE_CHECKING. Verified the six mypy errors on the unchanged base. With this annotation, all 144 source files pass mypy 1.14.1 under both Flask 3.1.3 and Flask 2.0.2. Pylint scores 10.00/10, the existing token-validation tests pass in both environments, and dictionary, Headers and EnvironHeaders checks cover valid, absent, invalid and disabled authentication.
Afloat16
force-pushed
the
fix/s3-raw-keys-and-streams
branch
from
November 9, 2026 12:56
cfbde17 to
e7ffeff
Compare
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.
What has been done
S3 lists raw keys, but reads previously interpreted
?and#as URL delimiters and removed all leading slashes. Preserve the entire key after the bucket separator, including percent sequences, in both the gallery prefix and returned identities. Close the S3 response body after reading and on exceptions.How to test
python -m pytest -q tests/unit/test_s3_object_paths.py tests/unit/test_filestore.pypassed all 15 cases on Python 3.12. All six new cases fail on base a8cee7b. A separate boto3 paginator and botocore Stubber check verified the outgoing keys and cleanup of a real StreamingBody. No AWS account is required for these tests.