Skip to content

Commit 6379933

Browse files
committed
Prevent name clash
1 parent e577953 commit 6379933

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

maxminddb/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
MODE_FD,
1919
)
2020
from maxminddb.decoder import InvalidDatabaseError
21-
from maxminddb.reader import Reader
21+
from maxminddb.reader import Reader as PyReader
2222

2323

2424
def open_database(
2525
database: Union[AnyStr, int, os.PathLike, IO], mode: int = MODE_AUTO
26-
) -> Union[Reader, "maxminddb.extension.Reader"]:
26+
) -> Union[PyReader, "maxminddb.extension.Reader"]:
2727
"""Open a Maxmind DB database
2828
2929
Arguments:
@@ -47,7 +47,7 @@ def open_database(
4747
)
4848
return maxminddb.extension.Reader(database)
4949
if mode in (MODE_AUTO, MODE_MMAP, MODE_FILE, MODE_MEMORY, MODE_FD):
50-
return maxminddb.reader.Reader(database, mode)
50+
return PyReader(database, mode)
5151
raise ValueError("Unsupported open mode: {0}".format(mode))
5252

5353

0 commit comments

Comments
 (0)