Skip to content

Commit 703ae1f

Browse files
committed
[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 #12251 X-original-commit: b27431c Signed-off-by: Antoine Vandevenne (anv) <[email protected]> Signed-off-by: Victor Feyens (vfe) <[email protected]>
1 parent a6a20f5 commit 703ae1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/github_link/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import inspect
2424
import os.path
2525

26-
import werkzeug
2726
import contextlib
27+
from urllib.parse import urlunsplit
2828

2929

3030
def setup(app):
@@ -93,7 +93,7 @@ def make_github_link(app, project, path, line=None, mode="blob"):
9393
branch = 'master'
9494

9595
urlpath = f"/{app.config.github_user}/{project}/{mode}/{branch}/{path}"
96-
return werkzeug.urls.url_unparse((
96+
return urlunsplit((
9797
'https',
9898
'github.com',
9999
urlpath,

0 commit comments

Comments
 (0)