ivandasch commented on a change in pull request #40:
URL: 
https://github.com/apache/ignite-python-thin-client/pull/40#discussion_r648193354



##########
File path: pyignite/aio_client.py
##########
@@ -487,3 +489,21 @@ def get_cluster(self) -> 'AioCluster':
         :return: :py:class:`~pyignite.aio_cluster.AioCluster` instance.
         """
         return AioCluster(self)
+
+    def tx_start(self, concurrency: TransactionConcurrency = 
TransactionConcurrency.PESSIMISTIC,
+                 isolation: TransactionIsolation = 
TransactionIsolation.REPEATABLE_READ,
+                 timeout: Union[int, float] = 0, label: Optional[str] = None) 
-> 'AioTransaction':
+        """
+        Start async thin client transaction.
+
+        :param concurrency: (optional) transaction concurrency, see
+                
:py:class:`~pyignite.datatypes.transactions.TransactionConcurrency`
+        :param isolation: (optional) transaction isolation level, see
+                
:py:class:`~pyignite.datatypes.transactions.TransactionIsolation`
+        :param timeout: (optional) transaction timeout in seconds if float, in 
millis if int
+        :param label: (optional) transaction label.
+        :return: :py:class:`~pyignite.transaction.AioTransaction` instance.
+        """
+        if sys.version_info < (3, 7):
+            raise NotSupportedError(f"Transactions are not supported in async 
client on current python {sys.version}")

Review comment:
       Python 3.7 is supported. Python 3.6 is not supported, because there is 
no good backport of contextvars for async stuff to python 3.6.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to