Skip to content

Commit

Permalink
Add pymongo to the list of install dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoebus Mak authored and Gem Dot Artigas committed Sep 25, 2023
1 parent 0e2fa32 commit 9b03cf2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion python/arcticdb/adapters/mongo_library_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ install_requires =
decorator
prometheus_client
packaging
pymongo

[flake8]
# max line length for black
Expand Down Expand Up @@ -126,7 +127,6 @@ Testing =
flask # Used by moto
flask-cors
hypothesis <6.73
pymongo
azure-storage-blob
azure-identity
coverage
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9b03cf2

Please sign in to comment.