Skip to content

Commit 702c6a0

Browse files
author
James William Pye
committed
remove ipaddr fallback as there are inconsistencies
essentially, push the user to cp -r ipaddress from [python] 3.3 to 3.2 installs.
1 parent 5267956 commit 702c6a0

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

postgresql/test/test_driver.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,9 @@
286286
),
287287
]
288288

289-
has_ipaddress = False
290289
try:
291290
import ipaddress
292-
has_ipaddress = True
293-
except ImportError:
294-
import ipaddr as ipaddress
295-
has_ipaddress = True
296291

297-
if has_ipaddress:
298292
type_samples.extend([
299293
('inet', [
300294
ipaddress.IPv4Address('255.255.255.255'),
@@ -334,6 +328,8 @@
334328
],
335329
),
336330
])
331+
except ImportError:
332+
pass
337333

338334
class test_driver(unittest.TestCase):
339335
@pg_tmp

postgresql/types/io/pg_network.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from .. import INETOID, CIDROID, MACADDROID
22
from . import lib
3-
try:
4-
import ipaddress
5-
except ImportError:
6-
import ipaddr as ipaddress
3+
import ipaddress
74

85
oid_to_type = {
96
MACADDROID : str,

0 commit comments

Comments
 (0)