You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Daschinskiy (Jira)" <ji...@apache.org> on 2021/03/29 07:11:00 UTC

[jira] [Commented] (IGNITE-14432) Python thin: Support "with" statement for connection method

    [ https://issues.apache.org/jira/browse/IGNITE-14432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310457#comment-17310457 ] 

Ivan Daschinskiy commented on IGNITE-14432:
-------------------------------------------

[~isapego] Hi, patch is ready for review.

> Python thin: Support "with" statement for connection method
> -----------------------------------------------------------
>
>                 Key: IGNITE-14432
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14432
>             Project: Ignite
>          Issue Type: Improvement
>          Components: python, thin client
>            Reporter: Igor Sapego
>            Assignee: Ivan Daschinskiy
>            Priority: Major
>             Fix For: python-0.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> [pep-0343|https://www.python.org/dev/peps/pep-0343/] 
> instead of this:
> {code:python}client.connect(environ['DB_HOST'], int(environ['DB_PORT']))
>     try:
>         return client.sql(q, query_args=q_args, include_field_names=True)
>     finally:
>         client.close(){code}
> The user will be able to use this:
> {code:python}with client.connect(environ['DB_HOST'], int(environ['DB_PORT'])):
>     return client.sql(q, query_args=q_args, include_field_names=True){code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)