From 5ef391198a1291883ce9858e055d6aeac960581c Mon Sep 17 00:00:00 2001 From: Kelsey Jordahl Date: Wed, 26 Mar 2014 20:38:07 -0400 Subject: [PATCH] PY3: Use six library to import urlopen for 2/3 compatibility --- tests/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/util.py b/tests/util.py index c3a6b26..77a6683 100644 --- a/tests/util.py +++ b/tests/util.py @@ -1,5 +1,5 @@ import os.path -import urllib2 +from six.moves.urllib.request import urlopen from geopandas import GeoDataFrame, GeoSeries @@ -29,7 +29,7 @@ def download_nybb(): filename = os.path.join('examples', 'nybb_13a.zip') if not os.path.exists(filename): with open(filename, 'w') as f: - response = urllib2.urlopen('http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip') + response = urlopen('http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip') f.write(response.read()) return filename