Skip to content

Commit 7541a50

Browse files
authored
Backport important fixes to 4.2.z (#498)
This is combined PR to backport some important changes that would apply to 4.2.z. Mainly it fixes - broken links - test runners on Windows - wrong `int_from_bytes` calculation
1 parent 5a4b2ad commit 7541a50

File tree

10 files changed

+38
-35
lines changed

10 files changed

+38
-35
lines changed

.github/workflows/test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ jobs:
8080
- name: Generate documentation
8181
working-directory: docs
8282
run: |
83-
make html SPHINXOPTS="-W --keep-going"
83+
make html SPHINXOPTS="-W --keep-going -b linkcheck"

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hazelcast Python Client
1616

1717
----
1818

19-
`Hazelcast <https://hazelcast.org/>`__ is an open-source distributed
19+
`Hazelcast <https://hazelcast.com/>`__ is an open-source distributed
2020
in-memory data store and computation platform that provides a wide
2121
variety of distributed data structures and concurrency primitives.
2222

@@ -52,7 +52,7 @@ images <https://hub.docker.com/r/hazelcast/hazelcast/>`__.
5252
docker run -p 5701:5701 hazelcast/hazelcast:4.2
5353
5454
You can also use our ZIP or TAR
55-
`distributions <https://hazelcast.org/imdg/download/archives/#hazelcast-imdg>`__.
55+
`distributions <https://hazelcast.com/open-source-projects/downloads/>`__.
5656
Once you have downloaded, you can start the Hazelcast member using
5757
the ``bin/start.sh`` script.
5858

@@ -149,7 +149,7 @@ Features
149149
- Ability to listen to client lifecycle, cluster state, and distributed
150150
data structure events
151151
- and `many
152-
more <https://hazelcast.org/imdg/clients-languages/python/#client-features>`__
152+
more <https://hazelcast.com/clients/python/#client-features>`__
153153

154154
Getting Help
155155
------------
@@ -235,5 +235,5 @@ Copyright
235235

236236
Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
237237

238-
Visit `www.hazelcast.com <http://www.hazelcast.com>`__ for more
238+
Visit `hazelcast.com <https://hazelcast.com>`__ for more
239239
information.

docs/copyright.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Copyright
33

44
Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
55

6-
Visit `www.hazelcast.com <http://www.hazelcast.com>`__ for more
6+
Visit `hazelcast.com <https://hazelcast.com>`__ for more
77
information.

docs/getting_started.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Running Standalone JARs
5757

5858
Follow the instructions below to create a Hazelcast IMDG cluster:
5959

60-
1. Go to Hazelcast’s download `page <https://hazelcast.org/download/>`__
60+
1. Go to Hazelcast’s download `page
61+
<https://hazelcast.com/open-source-projects/downloads/>`__
6162
and download either the ``.zip`` or ``.tar`` distribution of
6263
Hazelcast IMDG.
6364
2. Decompress the contents into any directory that you want to run
@@ -127,7 +128,7 @@ If you want to add a ``Portable`` class, you should use
127128
the above configuration.
128129

129130
See the `Hazelcast IMDG Reference
130-
Manual <http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#getting-started>`__
131+
Manual <https://docs.hazelcast.com/imdg/latest/installation/installing-upgrading>`__
131132
for more information on setting up the clusters.
132133

133134
Downloading and Installing
@@ -170,7 +171,7 @@ that can be used in the Python client are discussed in the following
170171
sections.
171172

172173
See the `Hazelcast IMDG Reference
173-
Manual <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html>`__
174+
Manual <https://docs.hazelcast.com/imdg/latest/>`__
174175
and :ref:`configuration_overview:configuration overview` section for
175176
more information.
176177

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hazelcast Python Client
1616

1717
----
1818

19-
`Hazelcast <https://hazelcast.org/>`__ is an open-source distributed
19+
`Hazelcast <https://hazelcast.com/>`__ is an open-source distributed
2020
in-memory data store and computation platform that provides a wide
2121
variety of distributed data structures and concurrency primitives.
2222

docs/securing_client_connection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ TLS/SSL for Hazelcast Members
3333
Hazelcast allows you to encrypt socket level communication between
3434
Hazelcast members and between Hazelcast clients and members, for end to
3535
end encryption. To use it, see the `TLS/SSL for Hazelcast Members
36-
section <http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#tls-ssl-for-hazelcast-members>`__.
36+
section <https://docs.hazelcast.com/imdg/latest/security/tls-ssl#tlsssl-for-hazelcast-members>`__.
3737

3838
TLS/SSL for Hazelcast Python Clients
3939
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -252,7 +252,7 @@ property on the server side in the ``hazelcast.xml`` file:
252252
253253
You can see the details of setting mutual authentication on the server
254254
side in the `Mutual Authentication
255-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#mutual-authentication>`__
255+
section <https://docs.hazelcast.com/imdg/latest/security/tls-ssl#mutual-authentication>`__
256256
of the Hazelcast IMDG Reference Manual.
257257

258258
On the client side, you have to provide ``ssl_cafile``, ``ssl_certfile``

docs/using_python_client_with_hazelcast_imdg.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Using Map
163163
Hazelcast Map is a distributed dictionary. Through the Python client,
164164
you can perform operations like reading and writing from/to a Hazelcast
165165
Map with the well known get and put methods. For details, see the `Map
166-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#map>`__
166+
section <https://docs.hazelcast.com/imdg/latest/data-structures/map>`__
167167
in the Hazelcast IMDG Reference Manual.
168168

169169
A Map usage example is shown below.
@@ -186,7 +186,7 @@ Using MultiMap
186186

187187
Hazelcast MultiMap is a distributed and specialized map where you can
188188
store multiple values under a single key. For details, see the `MultiMap
189-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#multimap>`__
189+
section <https://docs.hazelcast.com/imdg/latest/data-structures/multimap>`__
190190
in the Hazelcast IMDG Reference Manual.
191191

192192
A MultiMap usage example is shown below.
@@ -216,7 +216,7 @@ Hazelcast Replicated Map is a distributed key-value data structure where
216216
the data is replicated to all members in the cluster. It provides full
217217
replication of entries to all members for high speed access. For
218218
details, see the `Replicated Map
219-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#replicated-map>`__
219+
section <https://docs.hazelcast.com/imdg/latest/data-structures/replicated-map>`__
220220
in the Hazelcast IMDG Reference Manual.
221221

222222
A Replicated Map usage example is shown below.
@@ -243,7 +243,7 @@ Using Queue
243243

244244
Hazelcast Queue is a distributed queue which enables all cluster members
245245
to interact with it. For details, see the `Queue
246-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#queue>`__
246+
section <https://docs.hazelcast.com/imdg/latest/data-structures/queue>`__
247247
in the Hazelcast IMDG Reference Manual.
248248

249249
A Queue usage example is shown below.
@@ -273,7 +273,7 @@ Using Set
273273

274274
Hazelcast Set is a distributed set which does not allow duplicate
275275
elements. For details, see the `Set
276-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#set>`__
276+
section <https://docs.hazelcast.com/imdg/latest/data-structures/set>`__
277277
in the Hazelcast IMDG Reference Manual.
278278

279279
A Set usage example is shown below.
@@ -300,7 +300,7 @@ Using List
300300

301301
Hazelcast List is a distributed list which allows duplicate elements and
302302
preserves the order of elements. For details, see the `List
303-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#list>`__
303+
section <https://docs.hazelcast.com/imdg/latest/data-structures/list>`__
304304
in the Hazelcast IMDG Reference Manual.
305305

306306
A List usage example is shown below.
@@ -334,7 +334,7 @@ items are overwritten or expired. You can reach each element in a
334334
Ringbuffer using a sequence ID, which is mapped to the elements between
335335
the head and tail (inclusive) of the Ringbuffer. For details, see the
336336
`Ringbuffer
337-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#ringbuffer>`__
337+
section <https://docs.hazelcast.com/imdg/latest/data-structures/ringbuffer>`__
338338
in the Hazelcast IMDG Reference Manual.
339339

340340
A Ringbuffer usage example is shown below.
@@ -410,7 +410,7 @@ Using Topic
410410

411411
Hazelcast Topic is a distribution mechanism for publishing messages that
412412
are delivered to multiple subscribers. For details, see the `Topic
413-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#topic>`__
413+
section <https://docs.hazelcast.com/imdg/latest/data-structures/topic>`__
414414
in the Hazelcast IMDG Reference Manual.
415415

416416
A Topic usage example is shown below.
@@ -444,7 +444,7 @@ begin, commit and rollback a transaction. You can obtain
444444
transaction-aware instances of queues, maps, sets, lists and multimaps
445445
via the ``Transaction`` object, work with them and commit or rollback in
446446
one shot. For details, see the `Transactions
447-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#transactions>`__
447+
section <https://docs.hazelcast.com/imdg/latest/transactions/transactions>`__
448448
in the Hazelcast IMDG Reference Manual.
449449

450450
.. code:: python
@@ -521,7 +521,7 @@ Hazelcast ``PNCounter`` (Positive-Negative Counter) is a CRDT
521521
positive-negative counter implementation. It is an eventually consistent
522522
counter given there is no member failure. For details, see the `PN
523523
Counter
524-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#pn-counter>`__
524+
section <https://docs.hazelcast.com/imdg/latest/data-structures/pn-counter>`__
525525
in the Hazelcast IMDG Reference Manual.
526526

527527
A PN Counter usage example is shown below.
@@ -551,7 +551,7 @@ Hazelcast ``FlakeIdGenerator`` is used to generate cluster-wide unique
551551
identifiers. Generated identifiers are long primitive values and are
552552
k-ordered (roughly ordered). IDs are in the range from ``0`` to ``2^63-1``
553553
(maximum signed long value). For details, see the `FlakeIdGenerator
554-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#flakeidgenerator>`__
554+
section <https://docs.hazelcast.com/imdg/latest/data-structures/flake-id-generator>`__
555555
in the Hazelcast IMDG Reference Manual.
556556

557557
.. code:: python
@@ -611,7 +611,7 @@ All data structures within CP Subsystem are available through
611611

612612
Before using Atomic Long, Lock, and Semaphore, CP Subsystem has to be
613613
enabled on cluster-side. Refer to `CP
614-
Subsystem <https://docs.hazelcast.org/docs/latest/manual/html-single/#cp-subsystem>`__
614+
Subsystem <https://docs.hazelcast.com/imdg/latest/cp-subsystem/cp-subsystem>`__
615615
documentation for more information.
616616

617617
Data structures in CP Subsystem run in CP groups. Each CP group elects
@@ -659,7 +659,7 @@ execution semantics. It goes with at-least-once execution semantics by
659659
default and can cause an API call to be committed multiple times in case
660660
of CP member failures. It can be tuned to offer at-most-once execution
661661
semantics. Please see
662-
`fail-on-indeterminate-operation-state <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#cp-subsystem-configuration>`__
662+
`fail-on-indeterminate-operation-state <https://docs.hazelcast.com/imdg/latest/cp-subsystem/configuration>`__
663663
server-side setting.
664664

665665
Using Lock
@@ -689,7 +689,7 @@ A basic Lock usage example is shown below.
689689
690690
FencedLock works on top of CP sessions. It keeps a CP session open while
691691
the lock is acquired. Please refer to `CP
692-
Session <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#cp-sessions>`__
692+
Session <https://docs.hazelcast.com/imdg/latest/cp-subsystem/sessions>`__
693693
documentation for more information.
694694

695695
By default, FencedLock is reentrant. Once a caller acquires the lock, it
@@ -737,7 +737,7 @@ After that, once Client-1 comes back alive, its write request will be
737737
rejected by the external service, and only Client-2 will be able to
738738
safely talk to it.
739739

740-
.. figure:: https://docs.hazelcast.org/docs/latest/manual/html-single/images/FencedLock.png
740+
.. figure:: https://docs.hazelcast.com/imdg/latest/_images/FencedLock.png
741741
:alt: CP Fenced Lock diagram
742742

743743
CP Fenced Lock diagram
@@ -824,7 +824,7 @@ Semaphore data structure has two variations:
824824
they will not be automatically released. You can use the sessionless
825825
CP Semaphore implementation by enabling JDK compatibility
826826
``jdk-compatible`` server-side setting. Refer to `Semaphore
827-
configuration <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#semaphore-configuration>`__
827+
configuration <https://docs.hazelcast.com/imdg/latest/cp-subsystem/configuration>`__
828828
documentation for more details.
829829

830830
Using CountDownLatch
@@ -927,7 +927,7 @@ semantics. It goes with at-least-once execution semantics by default and
927927
can cause an API call to be committed multiple times in case of CP
928928
member failures. It can be tuned to offer at-most-once execution
929929
semantics. Please see
930-
`fail-on-indeterminate-operation-state <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#cp-subsystem-configuration>`__
930+
`fail-on-indeterminate-operation-state <https://docs.hazelcast.com/imdg/latest/cp-subsystem/configuration>`__
931931
server-side setting.
932932

933933
Distributed Events
@@ -1330,7 +1330,7 @@ The code that runs on the entries is implemented in Java on the server
13301330
side. The client side entry processor is used to specify which entry
13311331
processor should be called. For more details about the Java
13321332
implementation of the entry processor, see the `Entry Processor
1333-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/index.html#entry-processor>`__
1333+
section <https://docs.hazelcast.com/imdg/latest/computing/entry-processor>`__
13341334
in the Hazelcast IMDG Reference Manual.
13351335

13361336
After the above implementations and configuration are done and you start
@@ -2347,7 +2347,7 @@ Near Cache Invalidation
23472347
Invalidation is the process of removing an entry from the Near Cache
23482348
when its value is updated or it is removed from the original map (to
23492349
prevent stale reads). See the `Near Cache Invalidation
2350-
section <https://docs.hazelcast.org/docs/latest/manual/html-single/#near-cache-invalidation>`__
2350+
section <https://docs.hazelcast.com/imdg/latest/performance/near-cache#near-cache-invalidation>`__
23512351
in the Hazelcast IMDG Reference Manual.
23522352

23532353
Monitoring and Logging
@@ -2409,7 +2409,7 @@ client as follows:
24092409

24102410
After enabling the client statistics, you can monitor your clients using
24112411
Hazelcast Management Center. Please refer to the `Monitoring Clients
2412-
section <https://docs.hazelcast.org/docs/management-center/latest/manual/html/index.html#monitoring-clients>`__
2412+
section <https://docs.hazelcast.com/management-center/latest/monitor-imdg/monitor-clients>`__
24132413
in the Hazelcast Management Center Reference Manual for more information
24142414
on the client statistics.
24152415

@@ -2519,7 +2519,7 @@ connections.
25192519
You can also group your clients using the client labels. These client
25202520
groups can be blacklisted in Hazelcast Management Center so that they
25212521
can be prevented from connecting to a cluster. See the `related
2522-
section <https://docs.hazelcast.org/docs/management-center/latest/manual/html/index.html#changing-cluster-client-filtering>`__
2522+
section <https://docs.hazelcast.com/management-center/latest/monitor-imdg/client-filtering>`__
25232523
in the Hazelcast Management Center Reference Manual for more information
25242524
on this topic.
25252525

hazelcast/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ class HazelcastJsonValue(object):
308308
JSON strings.
309309
310310
HazelcastJsonValue is queried using Hazelcast's querying language.
311-
See `Distributed Query section <https://github.com/hazelcast/hazelcast-python-client#77-distributed-query>`_.
312311
313312
In terms of querying, numbers in JSON strings are treated as either
314313
Long or Double in the Java side. str, bool and None

hazelcast/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def int_from_bytes(buffer):
411411
if buffer[0] & 0x80:
412412
neg = bytearray()
413413
for c in buffer:
414-
neg.append(~c)
414+
neg.append(c ^ 0xFF)
415415
return -1 * int(binascii.hexlify(neg), 16) - 1
416416
return int(binascii.hexlify(buffer), 16)
417417

run_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def wait_until_rc_is_ready():
2727
rc_process = start_rc(rc_stdout, rc_stderr)
2828
try:
2929
wait_until_rc_is_ready()
30+
sys.stdout.flush()
31+
3032
args = [
3133
__file__,
3234
"-v",
@@ -36,6 +38,7 @@ def wait_until_rc_is_ready():
3638
"--cover-package=hazelcast",
3739
"--cover-inclusive",
3840
"--nologcapture",
41+
"--traverse-namespace",
3942
"tests",
4043
]
4144

0 commit comments

Comments
 (0)