Repository navigation
Conversation
Treat only None as unset, parse the string form of int/float values, and parse booleans like Boolean.parseBoolean, warning for one release where the old strtobool parsing disagrees. Use property_as_bool for all boolean properties, and stop get_first_property_value from skipping empty values; callers passing credentials to AWS SDKs map empty values to None so the default credential chain is still used. Closes apache#4529 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
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.
Closes #4529. Follow-up to #4489.
Aligns
pyiceberg/utils/properties.pywith Java'sPropertyUtil:Noneis treated as unset. An empty string now raisesValueErrorinproperty_as_int/property_as_float(Java throwsNumberFormatException).property_as_int/property_as_floatparsestr(value), so non-string values likeFalseor1.5for an int property raise instead of becoming0/1.property_as_boolmatchesBoolean.parseBoolean: only"true"(case-insensitive) isTrue; anything else, including"", isFalse. ADeprecationWarningis emitted for one release when the previousstrtoboolparsing would have returnedTrue("1","yes","on","y","t").catalog/sql.py(echo,pool_pre_ping,init_catalog_tables) ands3.anonymousinio/pyarrow.py/io/fsspec.pynow useproperty_as_bool.get_first_property_valueonly skipsNone. Callers that pass credentials, region or profile to the AWS SDKs (pyarrow, fsspec, Glue, DynamoDB, REST SigV4) map an empty value toNone, so an empty credential still falls back to the default credential chain, as Java does withStrings.isNullOrEmpty.Properties.*_with_invalid_valuetests, whose assertions were inside thepytest.raisesblock and never ran.User-facing changes (release notes)
""now raise, and boolean properties set to""areFalse."true"is true."1","yes","on","y"and"t"are nowFalseand emit aDeprecationWarning.s3.access-key-idno longer falls back to the next key (e.g.client.access-key-id); the default credential chain is used instead.