diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-11 11:55:22 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-05-15 12:26:30 +0200 |
| commit | 01e35141479b8dfc4a390518f89fc52e7cec5396 (patch) | |
| tree | 24ac6661613e8088140eb607e604d44b2ff5ce42 /doc/_extensions/github_link.py | |
| parent | 54df4b36d7c826de3d07f81297aa17f74d8271ea (diff) | |
[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.
Diffstat (limited to 'doc/_extensions/github_link.py')
| -rw-r--r-- | doc/_extensions/github_link.py | 5 |
1 files changed, 3 insertions, 2 deletions
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, |
