diff --git a/.github/workflows/ci-build-release-wheels.yaml b/.github/workflows/ci-build-release-wheels.yaml index c64263ae..fc2bc4e1 100644 --- a/.github/workflows/ci-build-release-wheels.yaml +++ b/.github/workflows/ci-build-release-wheels.yaml @@ -55,12 +55,12 @@ jobs: uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a - - uses: docker/setup-buildx-action@v2 + - uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd - name: Build Manylinux Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 with: context: ./pkg/${{matrix.image.name}} load: true diff --git a/.github/workflows/ci-pr-validation.yaml b/.github/workflows/ci-pr-validation.yaml index 3c8fcdad..df2417de 100644 --- a/.github/workflows/ci-pr-validation.yaml +++ b/.github/workflows/ci-pr-validation.yaml @@ -124,12 +124,12 @@ jobs: uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a - - uses: docker/setup-buildx-action@v2 + - uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd - name: Build Manylinux Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 with: context: ./pkg/${{matrix.image.name}} load: true diff --git a/build-support/dep-url.sh b/build-support/dep-url.sh index 7670bb9e..b9494265 100644 --- a/build-support/dep-url.sh +++ b/build-support/dep-url.sh @@ -23,7 +23,7 @@ pulsar_cpp_base_url() { exit 1 fi VERSION=$1 - echo "https://archive.apache.org/dist/pulsar/pulsar-client-cpp-${VERSION}" + echo "https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-${VERSION}-candidate-1" } download_dependency() { diff --git a/dependencies.yaml b/dependencies.yaml index 0b87148b..308aeec2 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -17,7 +17,7 @@ # under the License. # -pulsar-cpp: 4.0.1 +pulsar-cpp: 4.1.0 pybind11: 3.0.1 # The OpenSSL dependency is only used when building Python from source openssl: 1.1.1q diff --git a/pkg/manylinux/Dockerfile b/pkg/manylinux/Dockerfile index a283d6ae..0c7c0e6d 100644 --- a/pkg/manylinux/Dockerfile +++ b/pkg/manylinux/Dockerfile @@ -33,4 +33,4 @@ ENV ARCH=${ARCH} RUN pip3 install setuptools # Dependencies for vcpkg on arm64 architecture -RUN yum install -y curl zip unzip tar perl-IPC-Cmd +RUN yum install -y curl zip unzip tar perl-IPC-Cmd perl-Time-Piece diff --git a/pulsar/__init__.py b/pulsar/__init__.py index 2375d16b..0f60552d 100644 --- a/pulsar/__init__.py +++ b/pulsar/__init__.py @@ -709,8 +709,7 @@ def __init__(self, service_url, Set the interval between each stats information update. Stats are printed and/or passed to the statistics listener at this interval. Set to 0 to disable stats collection. use_tls: bool, default=False - Configure whether to use TLS encryption on the connection. This setting is deprecated. - TLS will be automatically enabled if the ``serviceUrl`` is set to ``pulsar+ssl://`` or ``https://`` + it's a deprecated config that never works, whether TLS is enabled is determined by ``service_url``. tls_trust_certs_file_path: str, optional Set the path to the trusted TLS certificate file. If empty defaults to certifi. tls_allow_insecure_connection: bool, default=False @@ -782,8 +781,6 @@ def __init__(self, service_url, if listener_name: conf.listener_name(listener_name) - if use_tls or service_url.startswith('pulsar+ssl://') or service_url.startswith('https://'): - conf.use_tls(True) if tls_trust_certs_file_path: conf.tls_trust_certs_file_path(tls_trust_certs_file_path) else: diff --git a/src/config.cc b/src/config.cc index a83c0c0b..4c5557d7 100644 --- a/src/config.cc +++ b/src/config.cc @@ -174,10 +174,6 @@ void export_config(py::module_& m) { .def("stats_interval_in_seconds", &ClientConfiguration::getStatsIntervalInSeconds) .def("stats_interval_in_seconds", &ClientConfiguration::setStatsIntervalInSeconds, return_value_policy::reference) - .def("use_tls", &ClientConfiguration::isUseTls) - .def("use_tls", &ClientConfiguration::setUseTls, return_value_policy::reference) - .def("tls_trust_certs_file_path", &ClientConfiguration::getTlsTrustCertsFilePath, - return_value_policy::copy) .def("tls_trust_certs_file_path", &ClientConfiguration::setTlsTrustCertsFilePath, return_value_policy::reference) .def("tls_private_key_file_path", &ClientConfiguration::getTlsPrivateKeyFilePath, diff --git a/tests/asyncio_test.py b/tests/asyncio_test.py index b6df63a2..8a441c44 100644 --- a/tests/asyncio_test.py +++ b/tests/asyncio_test.py @@ -93,8 +93,7 @@ async def test_batch_end_to_end(self): msg_ids = await asyncio.gather(*tasks) self.assertEqual(len(msg_ids), 5) # pylint: disable=fixme - # TODO: the result is wrong due to https://github.com/apache/pulsar-client-cpp/issues/531 - self.assertEqual(producer.last_sequence_id(), 8) + self.assertEqual(producer.last_sequence_id(), 4) ledger_id = msg_ids[0].ledger_id() entry_id = msg_ids[0].entry_id() # These messages should be in the same entry