python-ipware 2.0.0__tar.gz → 2.0.1__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.0/python_ipware.egg-info → python-ipware-2.0.1}/PKG-INFO +2 -2
- {python-ipware-2.0.0 → python-ipware-2.0.1}/README.md +0 -1
- {python-ipware-2.0.0 → python-ipware-2.0.1}/pyproject.toml +1 -0
- python-ipware-2.0.1/python_ipware/__version__.py +1 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware/python_ipware.py +1 -2
- {python-ipware-2.0.0 → python-ipware-2.0.1/python_ipware.egg-info}/PKG-INFO +2 -2
- {python-ipware-2.0.0 → python-ipware-2.0.1}/tests/tests_ipv4.py +0 -7
- python-ipware-2.0.0/python_ipware/__version__.py +0 -1
- {python-ipware-2.0.0 → python-ipware-2.0.1}/LICENSE +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware/__init__.py +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware/py.typed +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware.egg-info/SOURCES.txt +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware.egg-info/dependency_links.txt +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware.egg-info/requires.txt +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/python_ipware.egg-info/top_level.txt +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/setup.cfg +0 -0
- {python-ipware-2.0.0 → python-ipware-2.0.1}/tests/tests_ipv6.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-ipware
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
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
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
23
|
Requires-Python: >=3.7
|
|
23
24
|
Description-Content-Type: text/markdown
|
|
24
25
|
License-File: LICENSE
|
|
@@ -133,7 +134,6 @@ request_headers_precedence_order = (
|
|
|
133
134
|
"HTTP_X_CLUSTER_CLIENT_IP", # Rackspace LB and Riverbed Stingray
|
|
134
135
|
"HTTP_FORWARDED_FOR", # RFC 7239
|
|
135
136
|
"HTTP_FORWARDED", # RFC 7239
|
|
136
|
-
"HTTP_VIA", # Squid and others
|
|
137
137
|
"X-CLIENT-IP", # Microsoft Azure
|
|
138
138
|
"X-REAL-IP", # NGINX
|
|
139
139
|
"X-CLUSTER-CLIENT-IP", # Rackspace Cloud Load Balancers
|
|
@@ -103,7 +103,6 @@ request_headers_precedence_order = (
|
|
|
103
103
|
"HTTP_X_CLUSTER_CLIENT_IP", # Rackspace LB and Riverbed Stingray
|
|
104
104
|
"HTTP_FORWARDED_FOR", # RFC 7239
|
|
105
105
|
"HTTP_FORWARDED", # RFC 7239
|
|
106
|
-
"HTTP_VIA", # Squid and others
|
|
107
106
|
"X-CLIENT-IP", # Microsoft Azure
|
|
108
107
|
"X-REAL-IP", # NGINX
|
|
109
108
|
"X-CLUSTER-CLIENT-IP", # Rackspace Cloud Load Balancers
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.1"
|
|
@@ -26,7 +26,6 @@ class IpWareMeta:
|
|
|
26
26
|
"HTTP_X_CLUSTER_CLIENT_IP", # Rackspace LB and Riverbed Stingray
|
|
27
27
|
"HTTP_FORWARDED_FOR", # RFC 7239
|
|
28
28
|
"HTTP_FORWARDED", # RFC 7239
|
|
29
|
-
"HTTP_VIA", # Squid and others
|
|
30
29
|
"X-CLIENT-IP", # Microsoft Azure
|
|
31
30
|
"X-REAL-IP", # NGINX
|
|
32
31
|
"X-CLUSTER-CLIENT-IP", # Rackspace Cloud Load Balancers
|
|
@@ -106,7 +105,7 @@ class IpWareIpAddress:
|
|
|
106
105
|
ip = ipaddress.IPv4Address(ipv4)
|
|
107
106
|
except ipaddress.AddressValueError:
|
|
108
107
|
# not a valid IP address, return None
|
|
109
|
-
logging.
|
|
108
|
+
logging.info("Invalid ip address. {0}".format(ip_str))
|
|
110
109
|
ip = None
|
|
111
110
|
return ip
|
|
112
111
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-ipware
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
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
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
23
|
Requires-Python: >=3.7
|
|
23
24
|
Description-Content-Type: text/markdown
|
|
24
25
|
License-File: LICENSE
|
|
@@ -133,7 +134,6 @@ request_headers_precedence_order = (
|
|
|
133
134
|
"HTTP_X_CLUSTER_CLIENT_IP", # Rackspace LB and Riverbed Stingray
|
|
134
135
|
"HTTP_FORWARDED_FOR", # RFC 7239
|
|
135
136
|
"HTTP_FORWARDED", # RFC 7239
|
|
136
|
-
"HTTP_VIA", # Squid and others
|
|
137
137
|
"X-CLIENT-IP", # Microsoft Azure
|
|
138
138
|
"X-REAL-IP", # NGINX
|
|
139
139
|
"X-CLUSTER-CLIENT-IP", # Rackspace Cloud Load Balancers
|
|
@@ -364,13 +364,6 @@ class TestIPv4Headers(unittest.TestCase):
|
|
|
364
364
|
r = self.ipware.get_client_ip(meta)
|
|
365
365
|
self.assertEqual(r, (IPv4Address("177.139.233.139"), False))
|
|
366
366
|
|
|
367
|
-
def test_ipv4_http_via(self):
|
|
368
|
-
meta = {
|
|
369
|
-
"HTTP_VIA": "177.139.233.139",
|
|
370
|
-
}
|
|
371
|
-
r = self.ipware.get_client_ip(meta)
|
|
372
|
-
self.assertEqual(r, (IPv4Address("177.139.233.139"), False))
|
|
373
|
-
|
|
374
367
|
def test_ipv4_x_client_ip(self):
|
|
375
368
|
meta = {
|
|
376
369
|
"X-CLIENT-IP": "177.139.233.139",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.0"
|
|
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
|