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

            arun.vijayraghavan Arun Vijayraghavan (Inactive) created issue -
            Ellis.Breen Ellis Breen made changes -
            Field Original Value New Value
            Status New [ 10003 ] Open [ 1 ]
            Ellis.Breen Ellis Breen made changes -
            Fix Version/s 3.0.4 [ 17001 ]
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Sprint SDK32: QueryCollections [ 1104 ]
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked lower
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Fix Version/s 3.0.5 [ 17000 ]
            Fix Version/s 3.0.4 [ 17001 ]
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked lower
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked lower
            Ellis.Breen Ellis Breen made changes -
            Sprint SDK32: QueryCollections [ 1104 ] SDK-NET1 [ 890 ]
            Ellis.Breen Ellis Breen made changes -
            Sprint SDK-NET1 [ 890 ] SDK32: QueryCollections [ 1104 ]
            Ellis.Breen Ellis Breen made changes -
            Sprint SDK32: QueryCollections [ 1104 ]
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Fix Version/s 3.1.0 [ 16771 ]
            Fix Version/s 3.0.5 [ 17000 ]
            Ellis.Breen Ellis Breen made changes -
            Sprint SDK38: SearchFeat/Txns/Docs 2 [ 1213 ]
            Ellis.Breen Ellis Breen made changes -
            Rank Ranked lower
            Ellis.Breen Ellis Breen made changes -
            Fix Version/s 3.0.6 [ 17108 ]
            Fix Version/s 3.1.0 [ 16771 ]
            ingenthr Matt Ingenthron made changes -
            Sprint SDK38: SearchFeat/Txns/Docs 2 [ 1213 ]
            ingenthr Matt Ingenthron made changes -
            Rank Ranked higher
            Ellis.Breen Ellis Breen made changes -
            Fix Version/s 3.1.0 [ 16771 ]
            Fix Version/s 3.0.6 [ 17108 ]
            arun.vijayraghavan Arun Vijayraghavan (Inactive) made changes -
            Remote Link This issue links to "Page (Couchbase, Inc. Wiki)" [ 20921 ]
            ingenthr Matt Ingenthron made changes -
            Epic Link CBD-3537 [ 134745 ] PYCBC-1072 [ 144811 ]
            ingenthr Matt Ingenthron made changes -
            Rank Ranked higher
            ingenthr Matt Ingenthron made changes -
            Fix Version/s 3.0.7core [ 17228 ]
            Fix Version/s 3.1.0 [ 16771 ]
            ingenthr Matt Ingenthron made changes -
            Rank Ranked higher
            ingenthr Matt Ingenthron made changes -
            Assignee Ellis Breen [ ellis.breen ] Richard Eilbert [ JIRAUSER25224 ]
            ingenthr Matt Ingenthron made changes -
            Fix Version/s .backlog3.x [ 17256 ]
            Fix Version/s 3.0.7core [ 17228 ]

            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.
            reilbert Richard Eilbert made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            reilbert Richard Eilbert made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            ingenthr Matt Ingenthron made changes -
            Fix Version/s 3.0.9 [ 17292 ]
            Fix Version/s .backlog3.x [ 17256 ]
            ingenthr Matt Ingenthron made changes -
            Epic Link PYCBC-1072 [ 144811 ] CBD-3537 [ 134745 ]
            ingenthr Matt Ingenthron made changes -
            Workflow Couchbase SDK Workflow [ 176388 ] Couchbase SDK Workflow with Review [ 257465 ]

            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