diff --git a/python/arcticdb/adapters/mongo_library_adapter.py b/python/arcticdb/adapters/mongo_library_adapter.py index d32275001d..db16c4f68c 100644 --- a/python/arcticdb/adapters/mongo_library_adapter.py +++ b/python/arcticdb/adapters/mongo_library_adapter.py @@ -28,7 +28,9 @@ def supports_uri(uri: str) -> bool: def __init__(self, uri: str, encoding_version: EncodingVersion, *args, **kwargs): try: - parameters = pymongo.uri_parser.parse_uri(uri) + parameters = pymongo.uri_parser.parse_uri( + uri + ) # also checks pymongo uri syntax, throw exception as early as possible if syntax is incorrect self._endpoint = f"{parameters['nodelist'][0][0]}:{parameters['nodelist'][0][1]}" except Exception as e: raise UserInputException( diff --git a/setup.cfg b/setup.cfg index 19f91ab4b8..9bbb1add25 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,6 +48,7 @@ install_requires = decorator prometheus_client packaging + pymongo [flake8] # max line length for black @@ -126,7 +127,6 @@ Testing = flask # Used by moto flask-cors hypothesis <6.73 - pymongo azure-storage-blob azure-identity coverage diff --git a/setup.py b/setup.py index 1a86fbebbd..34292eb7cb 100644 --- a/setup.py +++ b/setup.py @@ -61,7 +61,9 @@ def run(self): python = sys.version_info[:2] print(f"\nProtoc compilation (into '{output_dir}') for versions '{self.proto_vers}':") for proto_ver in self.proto_vers: - if (python <= (3, 6) and proto_ver >= "4") or (python >= (3, 11) and proto_ver == "3"): + if python >= (3, 11) and proto_ver == "3": + print(f"Python protobuf {proto_ver} is not officially supported on Python {python}. Skipping...") # e.g. https://pypi.org/project/protobuf/3.20.3/#files + elif python <= (3, 6) and proto_ver >= "4": print(f"Python protobuf {proto_ver} do not run on Python {python}. Skipping...") else: self._compile_one_version(proto_ver, os.path.join(output_dir, proto_ver))