Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apache/pulsar-client-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.0
Choose a base ref
...
head repository: apache/pulsar-client-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.0
Choose a head ref
  • 19 commits
  • 26 files changed
  • 4 contributors

Commits on Feb 2, 2023

  1. Update the release process for versioning (#91)

    ### Motivation
    
    Adopt the same versioning rule with the Node.js client, see
    apache/pulsar-client-node#287.
    
    Add an extra step to commit the version update directly before pushing
    the tag. For example, fda5086
    BewareMyPower authored Feb 2, 2023
    Configuration menu
    Copy the full SHA
    cbd31e7 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Issue #31 - Access name attribute of any type object (#92)

    Addresses Issue #31 - we should access a string representation of the given object rather than assuming that the object itself can be concatenated with a string.
    erichare authored Feb 13, 2023
    Configuration menu
    Copy the full SHA
    e3eed2d View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    ed6983b View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. Configuration menu
    Copy the full SHA
    2aaacad View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2bab367 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. [docs] Describe how to install the candidate wheels (#97)

    * Describe how to install the candidated wheels
    
    * Fix the KEYS URL
    BewareMyPower authored Feb 17, 2023
    Configuration menu
    Copy the full SHA
    9b3c55f View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. Wrap the interruption to a custom exception when a blocking API is in…

    …terrupted (#99)
    
    ### Motivation
    
    Currently, when a blocking API is interrupted by a signal, `SystemError`
    will be thrown. However, in this case, `PyErr_SetInterrupt` will be
    called and next time a blocking API is called, `std::system_error` will
    be somehow thrown.
    
    The failure of
    https://lists.apache.org/thread/cmzykd9qz9x1d0s35nc5912o3slwpxpv is
    caused by this issue. The `SystemError` is not called, then
    `client.close()` will be skipped, which leads to the `bad_weak_ptr`
    error.
    
    P.S. Currently we have to call `client.close()` on a `Client` instance,
    otherwise, the `bad_weak_ptr` will be thrown.
    
    However, even if we caught the `SystemError` like:
    
    ```python
        try:
            msg = consumer.receive()
            # ...
        except SystemError:
            break
    ```
    
    we would still see the following error:
    
    ```
    terminate called after throwing an instance of 'std::system_error'
      what():  Operation not permitted
    Aborted
    ```
    
    ### Modifications
    
    - Wrap `ResultInterrupted` into the `pulsar.Interrupted` exception.
    - Refactor the `waitForAsyncValue` and `waitForAsyncResult` functions
      and raise `pulsar.Interrupted` when `PyErr_CheckSignals` detects a
      signal.
    - Add `InterruptedTest` to cover this case.
    - Remove `future.h` since we now use `std::future` instead of the
      manually implemented `Future`.
    - Fix the `examples/consumer.py` to support stopping by Ctrl+C.
    BewareMyPower authored Mar 7, 2023
    Configuration menu
    Copy the full SHA
    ec05f50 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    a6476d9 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. Configuration menu
    Copy the full SHA
    623df3a View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. Update to bookkeeper client 4.16.1 (#111)

    The new BK client is now working with newer version of Grpc, so we can upgrade and use Grpc >1.37 which comes with pre-packaged binaries.
    merlimat authored Apr 20, 2023
    Configuration menu
    Copy the full SHA
    cf2c7c4 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2023

  1. Update README.md (#117)

    momo-jun authored May 14, 2023
    Configuration menu
    Copy the full SHA
    fee8d1d View commit details
    Browse the repository at this point in the history

Commits on May 17, 2023

  1. Bump the C++ client to 3.2.0 (#118)

    * Bump the C++ client to 3.2.0
    
    Fixes #116
    
    apache/pulsar-client-cpp#266 is included in the
    C++ client 3.2.0 so that #116 will be fixed.
    
    * Change the download URL since archive.apache.org is not available now
    
    * Revert "Change the download URL since archive.apache.org is not available now"
    
    This reverts commit 6b92e98.
    BewareMyPower authored May 17, 2023
    Configuration menu
    Copy the full SHA
    cf4a9c0 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Add docs and tests for AuthenticationOauth2 (#120)

    ### Modifications
    
    Add tests to verify the changes of
    apache/pulsar-client-cpp#249 work for the Python
    client.
    
    Add docs to describe valid JSON fields used to create an
    `AuthenticationOauth2` instance.
    BewareMyPower authored May 23, 2023
    Configuration menu
    Copy the full SHA
    87a3506 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Make acknowledge APIs synchronous and improve the documents (#121)

    Fixes #114
    
    ### Motivation
    
    Currently the `acknowledge` and `acknowledge_cumulative` methods are all
    asynchronous. Even if any error happened, no exception would be raised.
    For example, when acknowledging cumulatively on a consumer whose
    consumer type is Shared or KeyShared, no error happens.
    
    ### Modifications
    
    - Change these methods to synchronous and raise exceptions if the
      acknowledgment failed.
    - Add `PulsarTest.test_acknowledge_failed` to test these failed cases.
    - Improve the documents to describe which exceptions could be raised in
      which cases.
    BewareMyPower authored May 24, 2023
    Configuration menu
    Copy the full SHA
    0028893 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d1402a View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. Release the GIL before any call to async methods (#123)

    Fix #122 
    
    When call an async method on Pulsar C++ client, we need to be releasing the GIL to avoid a deadlock between that and the producer lock.
    merlimat authored May 25, 2023
    Configuration menu
    Copy the full SHA
    ce25b36 View commit details
    Browse the repository at this point in the history
  2. Fetch writer schema to decode Avro messages (#119)

    Fixes #108
    
    ### Motivation
    
    Currently the Python client uses the reader schema, which is the schema
    of the consumer, to decode Avro messages. However, when the writer
    schema is different from the reader schema, the decode will fail.
    
    ### Modifications
    
    Add `attach_client` method to `Schema` and call it when creating
    consumers and readers. This method stores a reference to a
    `_pulsar.Client` instance, which leverages the C++ APIs added in
    apache/pulsar-client-cpp#257 to fetch schema
    info. The `AvroSchema` class fetches and caches the writer schema if it
    is not cached, then use both the writer schema and reader schema to
    decode messages.
    
    Add `test_schema_evolve` to test consumers or readers can decode
    any message whose writer schema is different with the reader schema.
    BewareMyPower authored May 25, 2023
    Configuration menu
    Copy the full SHA
    d2fac8f View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Include the C extension when generating API docs (#126)

    ### Motivation
    
    #85 (comment)
    
    Some targets in the API docs are referenced from the `_pulsar` module,
    while the `pydoctor` command does not generate API docs for it. It's not
    friendly to users, e.g. they cannot find which values could
    `_pulsar.ConsumerType` be.
    
    ```
    pulsar/__init__.py:695: Cannot find link target for "_pulsar.ConsumerType"
    ```
    
    ### Modifications
    
    Fix the documents to describe how to include the API docs for the
    `_pulsar` module when generating API docs. It also fixes some other
    warnings when running the `pydoctor` command.
    BewareMyPower authored May 26, 2023
    Configuration menu
    Copy the full SHA
    39ac8f8 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Bump version to 3.2.0

    BewareMyPower committed May 29, 2023
    Configuration menu
    Copy the full SHA
    ba99cd5 View commit details
    Browse the repository at this point in the history
Loading