From 012c50aae5a72160dfe381f4002c40934a4ab880 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Tue, 22 Oct 2024 08:02:30 +0200 Subject: [PATCH 1/3] chore(release): prepare for next development iteration --- CHANGELOG.md | 2 ++ conda/meta.yaml | 6 +++--- influxdb_client/version.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 727c6ea1..c7e0c837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.48.0 [unreleased] + ## 1.47.0 [2024-10-22] ### Bug Fixes diff --git a/conda/meta.yaml b/conda/meta.yaml index 2595c51e..c7598938 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,5 +1,5 @@ {% set name = "influxdb_client" %} -{% set version = "1.46.0" %} +{% set version = "1.47.0" %} package: @@ -7,8 +7,8 @@ package: version: {{ version }} source: - url: https://files.pythonhosted.org/packages/53/9e/4bd499eff06eab47f7995178623d508703d2b4fedab1a3544b04ef06fb0c/influxdb_client-1.46.0.tar.gz - sha256: d5b5f3787db8ad75e64bf069fdc4d441e43b1a1d57f2c11082af309ef0b9722c + url: https://files.pythonhosted.org/packages/f0/d7/07b6d9c02b975ba7961427af5a40c910871a97f543b4f5762112084cea48/influxdb_client-1.47.0.tar.gz + sha256: 549f2c0ad458bbf79de1291ad5b07b823d80a3bcdbe77b4f0b436461aa008e2b build: number: 0 diff --git a/influxdb_client/version.py b/influxdb_client/version.py index 19339327..0cde499d 100644 --- a/influxdb_client/version.py +++ b/influxdb_client/version.py @@ -1,3 +1,3 @@ """Version of the Client that is used in User-Agent header.""" -VERSION = '1.47.0' +VERSION = '1.48.0dev0' From 44dd00eef8da9416ff9eebf6cb536dfbc4bcc5dc Mon Sep 17 00:00:00 2001 From: karel-rehor Date: Mon, 25 Nov 2024 14:49:34 +0100 Subject: [PATCH 2/3] fix: catch CancelledError and TimeoutError and add note about timeout (#679) * chore: add explanatory note to CancelledError. * docs: update CHANGELOG.md and README.md * chore: remove import of asyncio in non-async API --- CHANGELOG.md | 4 ++++ README.md | 7 +++++++ influxdb_client/client/flux_csv_parser.py | 6 +++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7e0c837..35a88ac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.48.0 [unreleased] +### Bug Fixes + +1. [#679](https://github.com/influxdata/influxdb-client-python/pull/679): Add note to caught errors about need to check client timeout. + ## 1.47.0 [2024-10-22] ### Bug Fixes diff --git a/README.md b/README.md index ef4eff86..5b541dcf 100644 --- a/README.md +++ b/README.md @@ -1313,6 +1313,13 @@ All async APIs are available via `influxdb_client.client.influxdb_client_async.I and also check to readiness of the InfluxDB via `/ping` endpoint: +The `InfluxDBClientAsync` constructor accepts a number of __configuration properties__. Most useful among these are: + +* `connection_pool_maxsize` - The total number of simultaneous connections. Defaults to `multiprocessing.cpu_count() * 5`. +* `enable_gzip` - enable gzip compression during `write` and `query` calls. Defaults to `false`. +* `proxy` - URL of an HTTP proxy to be used. +* `timeout` - The maximum number of milliseconds for handling HTTP requests from initial handshake to handling response data. This is passed directly to the underlying transport library. If large amounts of data are anticipated, for example from `query_api.query_stream(...)`, this should be increased to avoid `TimeoutError` or `CancelledError`. Defaults to 10_000 ms. + > ``` python > import asyncio > diff --git a/influxdb_client/client/flux_csv_parser.py b/influxdb_client/client/flux_csv_parser.py index 7a73e3f8..99e68094 100644 --- a/influxdb_client/client/flux_csv_parser.py +++ b/influxdb_client/client/flux_csv_parser.py @@ -1,6 +1,5 @@ """Parsing response from InfluxDB to FluxStructures or DataFrame.""" - import base64 import codecs import csv as csv_parser @@ -147,6 +146,11 @@ async def _parse_flux_response_async(self): df = self._prepare_data_frame() if not self._is_profiler_table(metadata.table): yield df + except BaseException as e: + e_type = type(e).__name__ + if "CancelledError" in e_type or "TimeoutError" in e_type: + e.add_note("Stream cancelled during read. Recommended: Check Influxdb client `timeout` setting.") + raise finally: self._close() From c8d806f1bb3357dec5bf62b0fe2eb84e1789b485 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 27 Nov 2024 09:24:29 +0100 Subject: [PATCH 3/3] chore(release): release version 1.48.0 [skip CI] --- CHANGELOG.md | 2 +- influxdb_client/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a88ac3..7b8b3c58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.48.0 [unreleased] +## 1.48.0 [2024-11-27] ### Bug Fixes diff --git a/influxdb_client/version.py b/influxdb_client/version.py index 0cde499d..2008b9ce 100644 --- a/influxdb_client/version.py +++ b/influxdb_client/version.py @@ -1,3 +1,3 @@ """Version of the Client that is used in User-Agent header.""" -VERSION = '1.48.0dev0' +VERSION = '1.48.0'