mirror of
https://github.com/odoo/documentation.git
synced 2025-12-12 07:29:27 +07:00
[FIX] core/github_link: deprecated werkzeug method
Latest versions of werkzeug do not provide url_unparse anymore,
leading to an error during the build:
AttributeError: module 'werkzeug.urls' has no attribute 'url_unparse'
This commit replaces the use of url_unparse by the urllib counterpart.
closes odoo/documentation#12249
X-original-commit: b27431c271
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -23,8 +23,8 @@ import importlib
|
||||
import inspect
|
||||
import os.path
|
||||
|
||||
import werkzeug
|
||||
import contextlib
|
||||
from urllib.parse import urlunsplit
|
||||
|
||||
|
||||
def setup(app):
|
||||
@@ -93,7 +93,7 @@ def make_github_link(app, project, path, line=None, mode="blob"):
|
||||
branch = 'master'
|
||||
|
||||
urlpath = f"/{app.config.github_user}/{project}/{mode}/{branch}/{path}"
|
||||
return werkzeug.urls.url_unparse((
|
||||
return urlunsplit((
|
||||
'https',
|
||||
'github.com',
|
||||
urlpath,
|
||||
|
||||
Reference in New Issue
Block a user