python-ipware 2.0.1__tar.gz → 2.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-ipware
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: A Python package to retrieve user's IP address
5
5
  Author-email: Val Neekman <info@neekware.com>
6
6
  License: MIT
@@ -0,0 +1 @@
1
+ __version__ = "2.0.2"
@@ -6,6 +6,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union
6
6
  IpAddressType = Union[ipaddress.IPv4Address, ipaddress.IPv6Address]
7
7
  OptionalIpAddressType = Optional[IpAddressType]
8
8
 
9
+ logger = logging.getLogger(__name__)
10
+
9
11
 
10
12
  class IpWareMeta:
11
13
  """
@@ -105,7 +107,7 @@ class IpWareIpAddress:
105
107
  ip = ipaddress.IPv4Address(ipv4)
106
108
  except ipaddress.AddressValueError:
107
109
  # not a valid IP address, return None
108
- logging.info("Invalid ip address. {0}".format(ip_str))
110
+ logger.info("Invalid ip address. {0}".format(ip_str))
109
111
  ip = None
110
112
  return ip
111
113
 
@@ -324,7 +326,7 @@ class IpWare(IpWareMeta, IpWareProxy, IpWareIpAddress):
324
326
  """
325
327
 
326
328
  if not ip_list:
327
- logging.warning("Invalid ip list provided.")
329
+ logger.warning("Invalid ip list provided.")
328
330
  return None, False
329
331
 
330
332
  # the incoming ips match our trusted proxy list
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-ipware
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: A Python package to retrieve user's IP address
5
5
  Author-email: Val Neekman <info@neekware.com>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = "2.0.1"
File without changes
File without changes
File without changes