From d9fea7563bb09af7f89a8dd115b95bc47b534a9d Mon Sep 17 00:00:00 2001 From: "ZhengYu, Xu" Date: Wed, 17 Apr 2024 16:00:37 +0800 Subject: [PATCH] No need to rely on the backport `importlib_metadata` for version retrieval anymore --- connectorx-python/connectorx/__init__.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/connectorx-python/connectorx/__init__.py b/connectorx-python/connectorx/__init__.py index b58590e80..ef95ad938 100644 --- a/connectorx-python/connectorx/__init__.py +++ b/connectorx-python/connectorx/__init__.py @@ -1,5 +1,7 @@ from typing import Optional, Tuple, Union, List, Dict, Any +from importlib.metadata import version + from .connectorx import ( read_sql as _read_sql, partition_sql as _partition_sql, @@ -7,17 +9,7 @@ get_meta as _get_meta, ) -try: - from importlib.metadata import version - - __version__ = version(__name__) -except: - try: - from importlib_metadata import version - - __version__ = version(__name__) - except: - pass +__version__ = version(__name__) import os