Igor Sapego created IGNITE-14432:
------------------------------------
Summary: Python thin: Support "with" statement for connection method
Key: IGNITE-14432
URL:
https://issues.apache.org/jira/browse/IGNITE-14432 Project: Ignite
Issue Type: Bug
Components: python, thin client
Reporter: Igor Sapego
Fix For: python-0.4.0
[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)