Skip to content

Commit 330b415

Browse files
committed
fix: removed mongodb storage
1 parent 58fbd72 commit 330b415

File tree

5 files changed

+2
-331
lines changed

5 files changed

+2
-331
lines changed

aw_datastore/__init__.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import platform as _platform
21
from typing import Callable, Dict
32

43
from . import storages
@@ -7,28 +6,13 @@
76

87

98
def get_storage_methods() -> Dict[str, Callable[..., storages.AbstractStorage]]:
10-
from .storages import (
11-
MemoryStorage,
12-
MongoDBStorage,
13-
PeeweeStorage,
14-
SqliteStorage,
15-
)
9+
from .storages import MemoryStorage, PeeweeStorage, SqliteStorage
1610

1711
methods: Dict[str, Callable[..., storages.AbstractStorage]] = {
1812
PeeweeStorage.sid: PeeweeStorage,
1913
MemoryStorage.sid: MemoryStorage,
2014
SqliteStorage.sid: SqliteStorage,
2115
}
22-
23-
# MongoDB is not supported on Windows or macOS
24-
if _platform.system() == "Linux": # pragma: no branch
25-
try:
26-
import pymongo # noqa: F401
27-
28-
methods[MongoDBStorage.sid] = MongoDBStorage
29-
except ImportError: # pragma: no cover
30-
pass
31-
3216
return methods
3317

3418

aw_datastore/storages/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
from .abstract import AbstractStorage
66
from .memory import MemoryStorage
7-
from .mongodb import MongoDBStorage
87
from .peewee import PeeweeStorage
98
from .sqlite import SqliteStorage
109

1110
__all__ = [
1211
"AbstractStorage",
1312
"MemoryStorage",
14-
"MongoDBStorage",
1513
"PeeweeStorage",
1614
"SqliteStorage",
1715
]

aw_datastore/storages/mongodb.py

-175
This file was deleted.

0 commit comments

Comments
 (0)