From 697b64968fa514dd7df26f94a03df10e1454fbb8 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:18:42 -0500 Subject: [PATCH] Merge `master` into `dev` (#149) * 0.10.2 version bump * 0.10.3 version bump * 0.11.0 version bump * Use `importlib.metadata` for version --- zigpy_zigate/__init__.py | 5 ----- zigpy_zigate/zigbee/application.py | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/zigpy_zigate/__init__.py b/zigpy_zigate/__init__.py index 5596505..e69de29 100644 --- a/zigpy_zigate/__init__.py +++ b/zigpy_zigate/__init__.py @@ -1,5 +0,0 @@ -MAJOR_VERSION = 0 -MINOR_VERSION = 11 -PATCH_VERSION = "0.dev0" -__short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) -__version__ = "{}.{}".format(__short_version__, PATCH_VERSION) diff --git a/zigpy_zigate/zigbee/application.py b/zigpy_zigate/zigbee/application.py index cda71b4..b54e5b8 100644 --- a/zigpy_zigate/zigbee/application.py +++ b/zigpy_zigate/zigbee/application.py @@ -1,6 +1,7 @@ from __future__ import annotations import asyncio +import importlib.metadata import logging from typing import Any @@ -12,7 +13,6 @@ import zigpy.util import zigpy.zdo -import zigpy_zigate from zigpy_zigate import common as c, types as t from zigpy_zigate.api import PDM_EVENT, NoResponseError, ResponseId, ZiGate from zigpy_zigate.config import ( @@ -91,7 +91,7 @@ async def load_network_info(self, *, load_devices: bool = False): ) self.state.network_info = zigpy.state.NetworkInfo( - source=f"zigpy-zigate@{zigpy_zigate.__version__}", + source=f"zigpy-zigate@{importlib.metadata.version('zigpy-zigate')}", extended_pan_id=epid, pan_id=zigpy.types.PanId(network_state[2]), nwk_update_id=0,