diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 2717add..cf5dc26 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -34,6 +34,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run pre-commit - uses: pre-commit/action@v2.0.3 + uses: pre-commit/action@v3.0.1 with: extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/btrdb/conn.py b/btrdb/conn.py index 0e9b5fc..f6f75d1 100644 --- a/btrdb/conn.py +++ b/btrdb/conn.py @@ -15,6 +15,7 @@ ## Imports ########################################################################## +import importlib.metadata import json import logging import os @@ -65,6 +66,11 @@ def __init__(self, addrportstr, apikey=None): The ``btrdb.connect`` method is a helper function to make connecting to the platform easier usually that will be sufficient for most users. """ + warn( + "This API is deprecated in favor of the pingthings_api, refer to your hub landing page for further documentation.", + DeprecationWarning, + stacklevel=2, + ) addrport = addrportstr.split(":", 2) # 100MB size limit ~ 2500 streams for 5000 points with each point being 64bit # 500MB size limit ~ 13K streams for 5000 points @@ -126,6 +132,12 @@ def __init__(self, apikey, client_call_details): if client_call_details.metadata is not None: metadata = list(client_call_details.metadata) metadata.append(("authorization", "Bearer " + apikey)) + metadata.append( + ( + "x-api-client", + "btrdbpy-" + importlib.metadata.version("btrdb"), + ) + ) self.method = client_call_details.method self.timeout = client_call_details.timeout self.credentials = client_call_details.credentials diff --git a/btrdb/version.py b/btrdb/version.py index 38d4c2f..45d10db 100644 --- a/btrdb/version.py +++ b/btrdb/version.py @@ -15,7 +15,7 @@ ## Module Info ########################################################################## -__version_info__ = {"major": 5, "minor": 33, "micro": 0, "releaselevel": "final"} +__version_info__ = {"major": 5, "minor": 34, "micro": 0, "releaselevel": "final"} ########################################################################## ## Helper Functions diff --git a/pyproject.toml b/pyproject.toml index b3aee86..8ae72c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "btrdb" -version = "5.33.0" +version = "5.34.0" authors = [ {name="PingThingsIO", email="support@pingthings.io"}, ] @@ -10,7 +10,7 @@ maintainers = [ description = "Bindings to interact with the Berkeley Tree Database using gRPC." readme = "README.md" license = {file="LICENSE.txt"} -requires-python = ">=3.7,<=3.10" +requires-python = ">=3.7,<=3.12" classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',