Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-999

Deprecate GetResult.expiry()

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.9
    • library

    Description

      The return type of this method should really be `Instant`, but that would be a breaking change.

      Instead, we can deprecate the `expiry()` method and add an `expiryTime()` method that returns an Instant.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            Added a 'deprecated' decorator in couchbase_core/supportability.py, akin to the existing @uncommitted, and decorated GetResult.expiry with it.

            @deprecated adds "This is a deprecated API, use expiryTime instead." to the GetResult.expiry docstring and also issues a warning to the same effect.

            Added new property 'expiryTime' which returns an "instant" i.e. unix timestamp.

            Modified uses of the expiry property to use expiryTime in tests_v3/cases/collection_t.py, and added a test that the expiry property still works as before.

            Generated the Python API docs and verified that GetResult.expiry is described as deprecated.

            reilbert Richard Eilbert added a comment - Added a 'deprecated' decorator in couchbase_core/supportability.py, akin to the existing @uncommitted, and decorated GetResult.expiry with it. @deprecated adds "This is a deprecated API, use expiryTime instead." to the GetResult.expiry docstring and also issues a warning to the same effect. Added new property 'expiryTime' which returns an "instant" i.e. unix timestamp. Modified uses of the expiry property to use expiryTime in tests_v3/cases/collection_t.py, and added a test that the expiry property still works as before. Generated the Python API docs and verified that GetResult.expiry is described as deprecated.

            People

              reilbert Richard Eilbert
              arun.vijayraghavan Arun Vijayraghavan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty