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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-ipware
3
- Version: 2.0.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
@@ -26,6 +26,7 @@ classifiers = [
26
26
  "Programming Language :: Python :: 3.9",
27
27
  "Programming Language :: Python :: 3.10",
28
28
  "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
29
30
  ]
30
31
 
31
32
  [project.urls]
@@ -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.exception("Invalid ip address. {0}".format(ip_str))
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.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