[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#12254

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:
Victor Feyens
2025-03-04 09:56:22 +00:00
parent 19049b656f
commit f61ba5d734

View File

@@ -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,