Skip to content

Commit 7ab8c64

Browse files
authored
Merge pull request #119 from maxmind/greg/update-maxminddb
Update maxminddb
2 parents 61eee0f + dd8df1b commit 7ab8c64

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
History
44
-------
55

6+
4.4.0
7+
++++++++++++++++++
8+
9+
* The public API on ``geoip2.database`` is now explicitly defined by
10+
setting ``__all__``.
11+
* The return type of the ``metadata()`` method on ``Reader`` is now
12+
``maxminddb.reader.Metadata`` rather than a union type.
13+
614
4.3.0 (2021-09-20)
715
++++++++++++++++++
816

geoip2/database.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
import maxminddb
1212

13-
# pylint: disable=unused-import
14-
from maxminddb import ( # type: ignore
13+
from maxminddb import (
1514
MODE_AUTO,
1615
MODE_MMAP,
1716
MODE_MMAP_EXT,
@@ -35,6 +34,16 @@
3534
ISP,
3635
)
3736

37+
__all__ = [
38+
"MODE_AUTO",
39+
"MODE_MMAP",
40+
"MODE_MMAP_EXT",
41+
"MODE_FILE",
42+
"MODE_MEMORY",
43+
"MODE_FD",
44+
"Reader",
45+
]
46+
3847

3948
class Reader:
4049
"""GeoIP2 database Reader object.
@@ -260,7 +269,7 @@ def _flat_model_for(
260269

261270
def metadata(
262271
self,
263-
) -> Union[maxminddb.reader.Metadata, "maxminddb.extension.Metadata"]:
272+
) -> maxminddb.reader.Metadata:
264273
"""The metadata for the open database.
265274
266275
:returns: :py:class:`maxminddb.reader.Metadata` object

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
aiohttp>=3.6.2,<4.0.0
2-
maxminddb>=2.1.0,<3.0.0
2+
maxminddb>=2.2.0,<3.0.0
33
requests>=2.24.0,<3.0.0
44
urllib3>=1.25.2,<2.0.0

0 commit comments

Comments
 (0)