hazelcast / hazelcast/hazelcast-python-client

Consider separating client configuration from other options to HazelcastClient constructor

オープン
#352 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
Priority: Low Source: Internal Type: Cleanup
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。