From 01e35141479b8dfc4a390518f89fc52e7cec5396 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 11 May 2017 11:55:22 +0200 Subject: [FIX] P3: urllib, urllib2 and urlparse In Python 3, all of these were "consolidated" under urllib(.request, .parse, .errors) which is inconvenient. Since we already have hard dependencies on requests and werkzeug(.urls, which is a backport of Python 3's unicode-aware urllib.parse) migrate *everything* to that. A sticking point is urllib2.URLError, those were (mostly) replaced by the slightly more general IOError which URLError extends. --- doc/_extensions/github_link.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/_extensions/github_link.py') diff --git a/doc/_extensions/github_link.py b/doc/_extensions/github_link.py index cd0c5380621..d3e5d61c28e 100644 --- a/doc/_extensions/github_link.py +++ b/doc/_extensions/github_link.py @@ -1,7 +1,8 @@ import inspect import importlib import os.path -from urlparse import urlunsplit + +from werkzeug import urls """ * adds github_link(mode) context variable: provides URL (in relevant mode) of @@ -81,7 +82,7 @@ def make_github_link(app, path, line=None, mode="blob"): path=path, mode=mode, ) - return urlunsplit(( + return urls.url_unparse(( 'https', 'github.com', urlpath, -- cgit v1.2.3