From 133808236dd7657763ea5884562066de9b5dbfad Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Fri, 23 Jun 2023 19:05:16 +0200 Subject: [PATCH 01/13] Added config_name args for specifying which config choose from config_file --- influxdb_client/client/_base.py | 6 +++--- influxdb_client/client/influxdb_client.py | 7 ++++--- influxdb_client/client/influxdb_client_async.py | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/influxdb_client/client/_base.py b/influxdb_client/client/_base.py index a3bc05d4..79c81ef2 100644 --- a/influxdb_client/client/_base.py +++ b/influxdb_client/client/_base.py @@ -99,7 +99,7 @@ def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, or pass @classmethod - def _from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): + def _from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", debug=None, enable_gzip=False, **kwargs): config = configparser.ConfigParser() is_json = False try: @@ -111,11 +111,11 @@ def _from_config_file(cls, config_file: str = "config.ini", debug=None, enable_g is_json = True def _config_value(key: str): - value = str(config[key]) if is_json else config['influx2'][key] + value = str(config[key]) if is_json else config[config_name][key] return value.strip('"') def _has_option(key: str): - return key in config if is_json else config.has_option('influx2', key) + return key in config if is_json else config.has_option(config_name, key) def _has_section(key: str): return key in config if is_json else config.has_section(key) diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index ca8dcb36..59b4634d 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -83,7 +83,7 @@ def __exit__(self, exc_type, exc_value, traceback): self.close() @classmethod - def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): + def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", debug=None, enable_gzip=False, **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. @@ -149,7 +149,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz profilers="query, operator" proxy = "http://proxy.domain.org:8080" - [tags] + [tags]config_name id = "132-987-655" customer = "California Miner" data_center = "${env.data_center}" @@ -173,7 +173,8 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClient._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) + return InfluxDBClient._from_config_file(config_file=config_file, config_name=config_name, + debug=debug, enable_gzip=enable_gzip, **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index 76f014f3..611e0969 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -99,7 +99,7 @@ async def close(self): self.api_client = None @classmethod - def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): + def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", debug=None, enable_gzip=False, **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. @@ -189,8 +189,8 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, - enable_gzip=enable_gzip, **kwargs) + return InfluxDBClientAsync._from_config_file(config_file=config_file, config_name=config_name, + debug=debug, enable_gzip=enable_gzip, **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): From 60089b932470772fe070f79caf82f603da74b0ae Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Fri, 23 Jun 2023 19:07:37 +0200 Subject: [PATCH 02/13] Fixed typo --- influxdb_client/client/influxdb_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index 59b4634d..dab3d7ae 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -149,7 +149,7 @@ def from_config_file(cls, config_file: str = "config.ini", config_name: str = "i profilers="query, operator" proxy = "http://proxy.domain.org:8080" - [tags]config_name + [tags] id = "132-987-655" customer = "California Miner" data_center = "${env.data_center}" From b67e42ca4ec68aabde0d7aee55972860b052a656 Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Fri, 23 Jun 2023 19:16:46 +0200 Subject: [PATCH 03/13] Fix line to long for passing convention test --- influxdb_client/client/_base.py | 3 ++- influxdb_client/client/influxdb_client.py | 3 ++- influxdb_client/client/influxdb_client_async.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/influxdb_client/client/_base.py b/influxdb_client/client/_base.py index 79c81ef2..be043e69 100644 --- a/influxdb_client/client/_base.py +++ b/influxdb_client/client/_base.py @@ -99,7 +99,8 @@ def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, or pass @classmethod - def _from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", debug=None, enable_gzip=False, **kwargs): + def _from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", + debug=None, enable_gzip=False, **kwargs): config = configparser.ConfigParser() is_json = False try: diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index dab3d7ae..e91ec6ae 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -83,7 +83,8 @@ def __exit__(self, exc_type, exc_value, traceback): self.close() @classmethod - def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", debug=None, enable_gzip=False, **kwargs): + def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", + debug=None, enable_gzip=False, **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index 611e0969..f386e242 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -99,7 +99,8 @@ async def close(self): self.api_client = None @classmethod - def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", debug=None, enable_gzip=False, **kwargs): + def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", + debug=None, enable_gzip=False, **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. From 5150f5fa7e5235a2c5632a0528ab3caa7042a11a Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Sat, 24 Jun 2023 01:26:53 +0200 Subject: [PATCH 04/13] Changed argument placement and added test --- influxdb_client/client/_base.py | 5 +++-- influxdb_client/client/influxdb_client.py | 4 ++-- influxdb_client/client/influxdb_client_async.py | 4 ++-- tests/config2.ini | 13 +++++++++++++ tests/test_InfluxDBClient.py | 6 ++++++ 5 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 tests/config2.ini diff --git a/influxdb_client/client/_base.py b/influxdb_client/client/_base.py index be043e69..c4a5032d 100644 --- a/influxdb_client/client/_base.py +++ b/influxdb_client/client/_base.py @@ -99,8 +99,9 @@ def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, or pass @classmethod - def _from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", - debug=None, enable_gzip=False, **kwargs): + def _from_config_file(cls, config_file: str = "config.ini", debug=None, + config_name: str = "influx2", enable_gzip=False, **kwargs): + config = configparser.ConfigParser() is_json = False try: diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index e91ec6ae..c16a6d95 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -83,8 +83,8 @@ def __exit__(self, exc_type, exc_value, traceback): self.close() @classmethod - def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", - debug=None, enable_gzip=False, **kwargs): + def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, + config_name: str = "influx2", **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index f386e242..b119240b 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -99,8 +99,8 @@ async def close(self): self.api_client = None @classmethod - def from_config_file(cls, config_file: str = "config.ini", config_name: str = "influx2", - debug=None, enable_gzip=False, **kwargs): + def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, + config_name: str = "influx2", **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. diff --git a/tests/config2.ini b/tests/config2.ini new file mode 100644 index 00000000..d7ea854a --- /dev/null +++ b/tests/config2.ini @@ -0,0 +1,13 @@ +[test_name] +url=http://localhost:8086 +org=my-org +token=my-token +timeout=6000 +connection_pool_maxsize=55 +auth_basic=false +profilers=query, operator + +[tags] +id = 132-987-655 +customer = California Miner +data_center = ${env.data_center} \ No newline at end of file diff --git a/tests/test_InfluxDBClient.py b/tests/test_InfluxDBClient.py index fdd76390..ca37291b 100644 --- a/tests/test_InfluxDBClient.py +++ b/tests/test_InfluxDBClient.py @@ -75,6 +75,12 @@ def test_init_from_ini_file(self): self.assertConfig() + def test_init_from_ini_file_custom_name(self): + self.client = InfluxDBClient.from_config_file( + f'{os.path.dirname(__file__)}/config2.ini', config_name='test_name') + + self.assertConfig() + def test_init_from_toml_file(self): self.client = InfluxDBClient.from_config_file(f'{os.path.dirname(__file__)}/config.toml') From b06f667b7179e9e84010db16dbe84b0842cbc3cc Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Tue, 27 Jun 2023 11:19:37 +0200 Subject: [PATCH 05/13] docs: added comments and updated CHANGELOG --- CHANGELOG.md | 2 ++ influxdb_client/client/influxdb_client.py | 1 + influxdb_client/client/influxdb_client_async.py | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0838da55..5dfce6f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -192,6 +192,8 @@ This release introduces a support for new version of InfluxDB OSS API definition ### Features 1. [#393](https://github.com/influxdata/influxdb-client-python/pull/393): Add callback function for getting profilers output with example and test +2. [#586](https://github.com/influxdata/influxdb-client-python/pull/586): Add `config_name` argument for + ``from_config_file`` function to allow loading a specific configuration from a config file ### Bug Fixes 1. [#375](https://github.com/influxdata/influxdb-client-python/pull/375): Construct `InfluxDBError` without HTTP response diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index c16a6d95..649d2f4f 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -92,6 +92,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz :param debug: Enable verbose logging of http requests :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints supports the Gzip compression. + :param config_name: Name of the configuration section of the configuration file :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy authentication. :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index b119240b..df3b8008 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -108,6 +108,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz :param debug: Enable verbose logging of http requests :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints supports the Gzip compression. + :param config_name: Name of the configuration section of the configuration file :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy authentication. :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests From 2d5a5e218657b265f103dfd1e881addfffebebc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Wed, 28 Jun 2023 10:36:22 +0200 Subject: [PATCH 06/13] docs: Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dfce6f2..16ba8f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", or client_session_kwargs={'trust_env': True}) as client: pass ``` +### Features +1. [#586](https://github.com/influxdata/influxdb-client-python/pull/586): Add `config_name` argument for ``from_config_file`` function to allow loading a specific configuration from a config file ### Bug Fixes 1. [#583](https://github.com/influxdata/influxdb-client-python/pull/583): Async HTTP client doesn't always use `HTTP_PROXY`/`HTTPS_PROXY` environment variables. [async/await] @@ -192,8 +194,6 @@ This release introduces a support for new version of InfluxDB OSS API definition ### Features 1. [#393](https://github.com/influxdata/influxdb-client-python/pull/393): Add callback function for getting profilers output with example and test -2. [#586](https://github.com/influxdata/influxdb-client-python/pull/586): Add `config_name` argument for - ``from_config_file`` function to allow loading a specific configuration from a config file ### Bug Fixes 1. [#375](https://github.com/influxdata/influxdb-client-python/pull/375): Construct `InfluxDBError` without HTTP response From 6c551f81ba226364f51d2e97b344617f93ec26c8 Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Wed, 28 Jun 2023 19:02:44 +0200 Subject: [PATCH 07/13] feats: argument to key argument --- CHANGELOG.md | 2 +- influxdb_client/client/_base.py | 3 ++- influxdb_client/client/influxdb_client.py | 8 +++----- influxdb_client/client/influxdb_client_async.py | 8 +++----- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16ba8f0f..17cbbcce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", or pass ``` ### Features -1. [#586](https://github.com/influxdata/influxdb-client-python/pull/586): Add `config_name` argument for ``from_config_file`` function to allow loading a specific configuration from a config file +1. [#586](https://github.com/influxdata/influxdb-client-python/pull/586): Add `config_name` key argument for ``from_config_file`` function to allow loading a specific configuration from a config file ### Bug Fixes 1. [#583](https://github.com/influxdata/influxdb-client-python/pull/583): Async HTTP client doesn't always use `HTTP_PROXY`/`HTTPS_PROXY` environment variables. [async/await] diff --git a/influxdb_client/client/_base.py b/influxdb_client/client/_base.py index c4a5032d..aa6eae5c 100644 --- a/influxdb_client/client/_base.py +++ b/influxdb_client/client/_base.py @@ -100,9 +100,10 @@ def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, or @classmethod def _from_config_file(cls, config_file: str = "config.ini", debug=None, - config_name: str = "influx2", enable_gzip=False, **kwargs): + enable_gzip=False, **kwargs): config = configparser.ConfigParser() + config_name = kwargs.get('config_name', 'influx2') is_json = False try: config.read(config_file) diff --git a/influxdb_client/client/influxdb_client.py b/influxdb_client/client/influxdb_client.py index 649d2f4f..6079aac0 100644 --- a/influxdb_client/client/influxdb_client.py +++ b/influxdb_client/client/influxdb_client.py @@ -83,8 +83,7 @@ def __exit__(self, exc_type, exc_value, traceback): self.close() @classmethod - def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, - config_name: str = "influx2", **kwargs): + def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. @@ -92,7 +91,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz :param debug: Enable verbose logging of http requests :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints supports the Gzip compression. - :param config_name: Name of the configuration section of the configuration file + :key config_name: Name of the configuration section of the configuration file :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy authentication. :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests @@ -175,8 +174,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClient._from_config_file(config_file=config_file, config_name=config_name, - debug=debug, enable_gzip=enable_gzip, **kwargs) + return InfluxDBClient._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index df3b8008..24b630bd 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -99,8 +99,7 @@ async def close(self): self.api_client = None @classmethod - def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, - config_name: str = "influx2", **kwargs): + def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): """ Configure client via configuration file. The configuration has to be under 'influx' section. @@ -108,7 +107,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz :param debug: Enable verbose logging of http requests :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints supports the Gzip compression. - :param config_name: Name of the configuration section of the configuration file + :key config_name: Name of the configuration section of the configuration file :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy authentication. :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests @@ -191,8 +190,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, config_name=config_name, - debug=debug, enable_gzip=enable_gzip, **kwargs) + return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): From d16a67588ab3d722fcf0c27f74d9dd493245d998 Mon Sep 17 00:00:00 2001 From: yanovskyy Date: Wed, 28 Jun 2023 19:05:56 +0200 Subject: [PATCH 08/13] fix: fixed length of line for code style consistency --- influxdb_client/client/influxdb_client_async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index 24b630bd..ea610afa 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -190,7 +190,8 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) + return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, + **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): From de720ba1fac84d0f6d96863f4c3f228f09650ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 29 Jun 2023 08:28:51 +0200 Subject: [PATCH 09/13] revert: useless changes --- influxdb_client/client/_base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/influxdb_client/client/_base.py b/influxdb_client/client/_base.py index aa6eae5c..b660c097 100644 --- a/influxdb_client/client/_base.py +++ b/influxdb_client/client/_base.py @@ -99,8 +99,7 @@ def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, or pass @classmethod - def _from_config_file(cls, config_file: str = "config.ini", debug=None, - enable_gzip=False, **kwargs): + def _from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): config = configparser.ConfigParser() config_name = kwargs.get('config_name', 'influx2') From cafb0b0bc60f1a1f4921a67dc35dd2f37ad09a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 29 Jun 2023 08:29:39 +0200 Subject: [PATCH 10/13] revert: Update _base.py --- influxdb_client/client/_base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/influxdb_client/client/_base.py b/influxdb_client/client/_base.py index b660c097..08e8ec54 100644 --- a/influxdb_client/client/_base.py +++ b/influxdb_client/client/_base.py @@ -100,7 +100,6 @@ def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, or @classmethod def _from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): - config = configparser.ConfigParser() config_name = kwargs.get('config_name', 'influx2') is_json = False From 094c4da6867e63a19e656ee82c6e1c258b9bb410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 29 Jun 2023 08:30:29 +0200 Subject: [PATCH 11/13] revert: influxdb_client_async.py --- influxdb_client/client/influxdb_client_async.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index ea610afa..24b630bd 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -190,8 +190,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, - **kwargs) + return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): From 687ef918a1d1ac2a005e1c56cfa2619cadda44c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 29 Jun 2023 08:31:11 +0200 Subject: [PATCH 12/13] revert: influxdb_client_async.py --- influxdb_client/client/influxdb_client_async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index 24b630bd..cedd718c 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -190,7 +190,8 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) + return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, + enable_gzip=enable_gzip, **kwargs) @classmethod def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): From 3577c585770d24596d9ac28115069c022700f220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bedn=C3=A1=C5=99?= Date: Thu, 29 Jun 2023 08:31:48 +0200 Subject: [PATCH 13/13] revert: influxdb_client_async.py --- influxdb_client/client/influxdb_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb_client/client/influxdb_client_async.py b/influxdb_client/client/influxdb_client_async.py index cedd718c..a8a2d173 100644 --- a/influxdb_client/client/influxdb_client_async.py +++ b/influxdb_client/client/influxdb_client_async.py @@ -190,7 +190,7 @@ def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gz } """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, + return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) @classmethod