From 8cc1087060acadc5f9141bc922cdfe99a8ab7185 Mon Sep 17 00:00:00 2001 From: David Morris Date: Thu, 16 Nov 2017 19:07:33 -0700 Subject: [PATCH] Update urllib2 to python3 version, relying on the already available 'future' package to provide the appropriate alias for use in python2 --- highcharts/highcharts/highcharts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/highcharts/highcharts/highcharts.py b/highcharts/highcharts/highcharts.py index e7c1ef6..e99df62 100644 --- a/highcharts/highcharts/highcharts.py +++ b/highcharts/highcharts/highcharts.py @@ -10,7 +10,7 @@ import json, uuid import re import datetime -import urllib2 +import urllib.request, urllib.error, urllib.parse import html from collections import Iterable from .options import BaseOptions, ChartOptions, ColorAxisOptions, \ @@ -334,7 +334,7 @@ def buildhtmlheader(self): if self.offline: - opener = urllib2.build_opener() + opener = urllib.request.build_opener() opener.addheaders = [('User-Agent', 'Mozilla/5.0')] self.header_css = [