hazelcast / hazelcast/hazelcast-python-client
Consider separating client configuration from other options to HazelcastClient constructor
- 主要言語
- Python
- スター
- 116
- フォーク
- 78
- 平均マージ
- 10日 22時間
- マージ済み PR(30日)
- 1
説明
Currently both client configuration and other options, such as lifecycle listeners are passed as unnamedkeyword arguments to `HazelcastClient` constructor. This works well ATM, but it may be problematic when we decide to add support for declarative configuration https://github.com/hazelcast/hazelcast-python-client/issues/351
Currently following snippet works:
```python
config = {
"lifecycle_listeners": [],
"cluster_name": "sample-cluster"
}
hz = HazelcastClient(**config)
```
One possible way of resolving this issue is passing non-client configuration-related arguments only as named keyword arguments to `HazelcastClient` constructor and passing cluster configuration in `**kwargs` (as currently implemented).
Example:
```python
client_config = {"cluster_name": "sample-cluster"}
hz = HazelcastClient(lifecycle_listeners=[], **cluster_config)
```
Separating HazelcastClient creation and cluster connection may help with removing options like `lifecyle_listeners`. See: https://github.com/hazelcast/hazelcast-python-client/issues/353
コントリビューションガイド
調査の方向性
まず HazelcastClient コンストラクターと、issue に示されている現在の名前なしキーワード設定を確認します。宣言的設定と接続分離の制約を理解するため、リンクされている issue 351 と 353 を読みます。クライアントオプションとクラスタ設定にそれぞれ異なるインターフェースがあり、使用例がその分離を反映した状態になれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api, backend
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100