Skip to content

Commit

Permalink
Merge pull request #119 from maxmind/greg/update-maxminddb
Browse files Browse the repository at this point in the history
Update maxminddb
  • Loading branch information
horgh authored Sep 24, 2021
2 parents 61eee0f + dd8df1b commit 7ab8c64
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
History
-------

4.4.0
++++++++++++++++++

* The public API on ``geoip2.database`` is now explicitly defined by
setting ``__all__``.
* The return type of the ``metadata()`` method on ``Reader`` is now
``maxminddb.reader.Metadata`` rather than a union type.

4.3.0 (2021-09-20)
++++++++++++++++++

Expand Down
15 changes: 12 additions & 3 deletions geoip2/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

import maxminddb

# pylint: disable=unused-import
from maxminddb import ( # type: ignore
from maxminddb import (
MODE_AUTO,
MODE_MMAP,
MODE_MMAP_EXT,
Expand All @@ -35,6 +34,16 @@
ISP,
)

__all__ = [
"MODE_AUTO",
"MODE_MMAP",
"MODE_MMAP_EXT",
"MODE_FILE",
"MODE_MEMORY",
"MODE_FD",
"Reader",
]


class Reader:
"""GeoIP2 database Reader object.
Expand Down Expand Up @@ -260,7 +269,7 @@ def _flat_model_for(

def metadata(
self,
) -> Union[maxminddb.reader.Metadata, "maxminddb.extension.Metadata"]:
) -> maxminddb.reader.Metadata:
"""The metadata for the open database.
:returns: :py:class:`maxminddb.reader.Metadata` object
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aiohttp>=3.6.2,<4.0.0
maxminddb>=2.1.0,<3.0.0
maxminddb>=2.2.0,<3.0.0
requests>=2.24.0,<3.0.0
urllib3>=1.25.2,<2.0.0

0 comments on commit 7ab8c64

Please sign in to comment.