Skip to content

Commit 21c7c6c

Browse files
authored
Merge pull request #131 from maxmind/greg/prepare-for-4.6.0
Prepare for 4.6.0
2 parents 845eaca + 75afb11 commit 21c7c6c

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
History
55
-------
66

7+
4.6.0 (2022-06-21)
8+
++++++++++++++++++
9+
10+
* The ``AddressNotFoundError`` class now has an ``ip_address`` attribute
11+
with the lookup address and ``network`` property for the empty network
12+
in the database containing the IP address. These are only available
13+
when using a database, not the web service. Pull request by illes.
14+
GitHub #130.
15+
716
4.5.0 (2021-11-18)
817
++++++++++++++++++
918

geoip2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint:disable=C0111
22

33
__title__ = "geoip2"
4-
__version__ = "4.5.0"
4+
__version__ = "4.6.0"
55
__author__ = "Gregory Oschwald"
66
__license__ = "Apache License, Version 2.0"
77
__copyright__ = "Copyright (c) 2013-2022 Maxmind, Inc."

geoip2/errors.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,24 @@ class AddressNotFoundError(GeoIP2Error):
2323
2424
.. attribute:: ip_address
2525
26-
The IP address used in the lookup.
26+
The IP address used in the lookup. This is only available for database
27+
lookups.
2728
2829
:type: str
2930
3031
.. attribute:: network
3132
3233
The network associated with the error. In particular, this is the
33-
largest network where no address would be found.
34+
largest network where no address would be found. This is only
35+
available for database lookups.
3436
3537
:type: ipaddress.IPv4Network or ipaddress.IPv6Network
3638
3739
"""
3840

41+
ip_address: Optional[str]
42+
_prefix_len: Optional[int]
43+
3944
def __init__(
4045
self,
4146
message: str,

0 commit comments

Comments
 (0)