hazelcast-python-client
hazelcast-python-client copied to clipboard
[API-1092] Convert `Config` classes to public API
These were converted into private classes during the 4.0 migration, as we were only supporting keyword arguments for the client configuration.
However, that led to a poor user experience, as we had to use **kwargs,
instead of listing all the configuration elements in the client constructor.
(IDEs become painfully slow once we list all keyword arguments, as there
are too many of them)
The solution to this problem is to make the Config classes public API and make the client able to use it directly.
config = Config()
config.cluster_name = "dev2"
client = HazelcastClient(config)
We provide full type hints for config elements.
Codecov Report
Merging #521 (3ac182c) into master (975bb48) will increase coverage by
0.02%. The diff coverage is99.22%.
@@ Coverage Diff @@
## master #521 +/- ##
==========================================
+ Coverage 96.46% 96.49% +0.02%
==========================================
Files 349 357 +8
Lines 19821 20510 +689
==========================================
+ Hits 19121 19791 +670
- Misses 700 719 +19
| Impacted Files | Coverage Δ | |
|---|---|---|
| hazelcast/config.py | 99.50% <99.20%> (+0.29%) |
:arrow_up: |
| hazelcast/client.py | 99.57% <100.00%> (ø) |
|
| hazelcast/proxy/flake_id_generator.py | 94.21% <100.00%> (ø) |
|
| hazelcast/proxy/reliable_topic.py | 94.60% <100.00%> (ø) |
|
| hazelcast/reactor.py | 87.82% <100.00%> (ø) |
|
| hazelcast/serialization/service.py | 93.00% <100.00%> (ø) |
|
| hazelcast/statistics.py | 87.64% <0.00%> (-0.57%) |
:arrow_down: |
| hazelcast/proxy/multi_map.py | 99.21% <0.00%> (-0.35%) |
:arrow_down: |
| hazelcast/protocol/builtin.py | 94.35% <0.00%> (-0.12%) |
:arrow_down: |
| hazelcast/proxy/cp/__init__.py | 97.77% <0.00%> (ø) |
|
| ... and 9 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@yuce can you force-merge this? I can't merge it because of the merge checks (they should be checking for ... ubuntu-20.04 but they are checking for ...ubuntu-latest in the name)