Skip to content

Commit dc68d00

Browse files
Fix docs build (#200)
* Updates `sphinx` version to `4.0.2` in the docs requirements * Adds temporary fix to `sphinxcontrib-mermaid` work properly with `sphinx >= 4` * Locks `jinja2==2.11.2` in docs requirements
1 parent 8e79f16 commit dc68d00

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

docs/conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,20 @@
1515
import os
1616
import sys
1717

18+
import sphinx
19+
1820
sys.path.insert(0, os.path.abspath('..'))
1921

22+
# TODO: Removes the whole if statement when the below PR is merged:
23+
# https://github.com/mgaitan/sphinxcontrib-mermaid/pull/71
24+
# From `sphinx>=4` the `ENOENT` constant was fully deprecated,
25+
# in order to make the things work with `sphinxcontrib-mermaid`
26+
# we need to mokey patch that constant.
27+
if sphinx.version_info[0] >= 4:
28+
import errno # noqa: WPS433
29+
import sphinx.util.osutil # noqa: I003, WPS301, WPS433
30+
sphinx.util.osutil.ENOENT = errno.ENOENT
31+
2032

2133
# -- Project information -----------------------------------------------------
2234

docs/requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is used to setup env
22
# to generate documentation.
33

4-
sphinx==3.5.4
4+
sphinx==4.0.2
55
sphinx-autodoc-typehints==1.12.0
66
sphinxcontrib-mermaid==0.6.3
77
sphinx-typlog-theme==0.8.0
@@ -11,3 +11,7 @@ tomlkit==0.7.0
1111

1212
# Dependencies of our project:
1313
typing-extensions==3.10.0.0
14+
15+
# TODO: Remove this lock when we found and fix the route case.
16+
# See: https://github.com/typlog/sphinx-typlog-theme/issues/22
17+
jinja2==2.11.2

0 commit comments

Comments
 (0)