You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2020/06/10 02:36:46 UTC

[flink] 01/02: [hotfix][python] Add version information for the methods defined in CompletableFuture

This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b1bc26662ed68cf7f6a0883996968ae98f182fce
Author: Dian Fu <di...@apache.org>
AuthorDate: Tue Jun 9 20:39:37 2020 +0800

    [hotfix][python] Add version information for the methods defined in CompletableFuture
---
 flink-python/pyflink/common/completable_future.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/flink-python/pyflink/common/completable_future.py b/flink-python/pyflink/common/completable_future.py
index 6edee94..d4e2f86 100644
--- a/flink-python/pyflink/common/completable_future.py
+++ b/flink-python/pyflink/common/completable_future.py
@@ -43,18 +43,24 @@ class CompletableFuture(object):
         Completes this CompletableFuture if not already completed.
 
         :return: true if this task is now cancelled
+
+        .. versionadded:: 1.11.0
         """
         return self._j_completable_future.cancel(True)
 
     def cancelled(self) -> bool:
         """
         Returns true if this CompletableFuture was cancelled before it completed normally.
+
+        .. versionadded:: 1.11.0
         """
         return self._j_completable_future.isCancelled()
 
     def done(self) -> bool:
         """
         Returns true if completed in any fashion: normally, exceptionally, or via cancellation.
+
+        .. versionadded:: 1.11.0
         """
         return self._j_completable_future.isDone()
 
@@ -63,6 +69,8 @@ class CompletableFuture(object):
         Waits if necessary for this future to complete, and then returns its result.
 
         :return: the result value
+
+        .. versionadded:: 1.11.0
         """
         if self._py_class is None:
             return self._j_completable_future.get()
@@ -72,6 +80,8 @@ class CompletableFuture(object):
     def exception(self):
         """
         Returns the exception that was set on this future or None if no exception was set.
+
+        .. versionadded:: 1.11.0
         """
         if self._j_completable_future.isCompletedExceptionally():
             try: