Conversation
- s3.py: Fix message to say 'at least 5 MiB (5242880 bytes)' instead of incorrectly showing byte count with MB suffix - s3.py & s3_async.py: Fix 'greater than' to 'at least' and 'less than' to 'at most' since the checks use inclusive bounds [<, >] Fixes pyathena-dev#926.
Member
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.
Summary
Three S3 block size error messages did not match the actual validation logic:
s3.py:1278 & s3_async.py:284: The check uses
block_size < MIN_PART_SIZE or > MAX_PART_SIZE(inclusive bounds), but the message said "greater than 5MiB and less than 5GiB" (exclusive). Updated to "at least 5 MiB and at most 5 GiB" to match the actual inclusive bounds.s3.py:2325: The message showed the byte count (5242880) with an "MB" suffix, which is confusing. Updated to "5 MiB (5242880 bytes)" to make the units clear.
Changes
pyathena/filesystem/s3.py: Fix two ValueError messagespyathena/filesystem/s3_async.py: Fix one ValueError messageReproduction
Fixes #926.