Skip to content

Commit 1862e03

Browse files
committed
comments
1 parent a46de8e commit 1862e03

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎pyiceberg/encryption/kms.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class KeyManagementClient(ABC):
3737
3838
Wraps and unwraps table encryption keys using master keys that the service holds.
3939
40-
Implementations are loaded by name from the catalog properties, so a subclass must keep
41-
this constructor signature, as `FileIO` does.
40+
Subclasses must accept `properties` as their only required constructor argument, so that
41+
they can be loaded by name like `FileIO`.
4242
"""
4343

4444
properties: Properties

‎tests/encryption/test_kms.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def test_key_management_client_cannot_be_instantiated() -> None:
3838
KeyManagementClient() # type: ignore[abstract]
3939

4040

41+
def test_client_keeps_its_properties() -> None:
42+
assert MemoryKeyManagementClient().properties == {}
43+
assert MemoryKeyManagementClient({"kms.key": "value"}).properties == {"kms.key": "value"}
44+
45+
4146
def test_generated_key_repr_redacts_key() -> None:
4247
generated = GeneratedKey(key=DEK, wrapped_key=b"wrapped")
4348

0 commit comments

Comments
 (0)