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.
- {python-ipware-2.0.1/python_ipware.egg-info → python-ipware-2.0.2}/PKG-INFO +1 -1
- python-ipware-2.0.2/python_ipware/__version__.py +1 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware/python_ipware.py +4 -2
- {python-ipware-2.0.1 → python-ipware-2.0.2/python_ipware.egg-info}/PKG-INFO +1 -1
- python-ipware-2.0.1/python_ipware/__version__.py +0 -1
- {python-ipware-2.0.1 → python-ipware-2.0.2}/LICENSE +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/README.md +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/pyproject.toml +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware/__init__.py +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware/py.typed +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware.egg-info/SOURCES.txt +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware.egg-info/dependency_links.txt +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware.egg-info/requires.txt +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/python_ipware.egg-info/top_level.txt +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/setup.cfg +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/tests/tests_ipv4.py +0 -0
- {python-ipware-2.0.1 → python-ipware-2.0.2}/tests/tests_ipv6.py +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
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 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|