refactor(rest): extract SigV4 signing into catalog/rest/sigv4.py#3446
Open
adamdavis99 wants to merge 1 commit into
Open
refactor(rest): extract SigV4 signing into catalog/rest/sigv4.py#3446adamdavis99 wants to merge 1 commit into
adamdavis99 wants to merge 1 commit into
Conversation
962ca91 to
ec9bb30
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.
Closes #3410
Rationale for this change
Extracts
SigV4Adapterand related signing constants out of the nested closure insideRestCatalog._init_sigv4into a dedicated modulepyiceberg/catalog/rest/sigv4.py. Separating concerns makes the signing logic easier to evolve, test, and extend independently of the catalog (e.g., retry config improvements tracked in #3008).Are these changes tested?
Yes. The existing 9 sigv4 tests in
tests/catalog/test_rest.pycoversigv4.pyat 100%. No new tests were added as this is a behavior-preserving refactor.Are there any user-facing changes?
SigV4Adapteris now a module-level class and explicitly re-exported frompyiceberg.catalog.rest. All existing imports continue to work unchanged. The previously privateRestCatalog._init_sigv4method has been removed (it was not part of the public API).