Skip to content

docs: add jinja2 pin#1352

Merged
blackboxsw merged 1 commit into
canonical:mainfrom
TheRealFalcon:doc-pin
Mar 25, 2022
Merged

docs: add jinja2 pin#1352
blackboxsw merged 1 commit into
canonical:mainfrom
TheRealFalcon:doc-pin

Conversation

@TheRealFalcon
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon commented Mar 24, 2022

CI docs is currently failing on main due to a new jinja2 release.

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[3.1.0 Released: about 7 hours agohttps://pypi.org/project/Jinja2/#history)]. yep. Internet broke us. While we are at it though, our pinning in this regard is so stale, it's probably worth bumping to what RTD says is a reasonable default today anyway

Why don't we instead bump our pins to newer versions while we are at it:

diff --git a/doc-requirements.txt b/doc-requirements.txt
index 387ebe9da..0465b57d2 100644
--- a/doc-requirements.txt
+++ b/doc-requirements.txt
@@ -1,10 +1,9 @@
 doc8
 m2r
-sphinx<2
-sphinx_rtd_theme
+sphinx==4.2.0
+sphinx_rtd_theme==1.0.0
 pyyaml
 
 # Indirect dependencies
-jinja2<3.1.0  # https://github.com/readthedocs/readthedocs.org/issues/9037
 docutils<0.18
 mistune<2.0.0  # https://github.com/miyakogi/m2r/issues/66

@TheRealFalcon
Copy link
Copy Markdown
Contributor Author

I tried newer versions and got failures, and @holmanb also has an open PR for updating docs at #1330, but I'll try this set too.

@TheRealFalcon
Copy link
Copy Markdown
Contributor Author

With the set you listed I get:

$ tox -re doc
GLOB sdist-make: /home/james/c/cloud-init/setup.py
doc recreate: /home/james/c/cloud-init/.tox/doc
doc installdeps: -r/home/james/c/cloud-init/doc-requirements.txt
doc inst: /home/james/c/cloud-init/.tox/.tmp/package/1/cloud-init-22.1.zip
doc installed: alabaster==0.7.12,attrs==21.4.0,Babel==2.9.1,certifi==2021.10.8,charset-normalizer==2.0.12,cloud-init @ file:///home/james/c/cloud-init/.tox/.tmp/package/1/cloud-init-22.1.zip,configobj==5.0.6,doc8==0.10.1,docutils==0.17.1,idna==3.3,imagesize==1.3.0,importlib-metadata==4.8.3,Jinja2==3.0.3,jsonpatch==1.32,jsonpointer==2.2,jsonschema==3.2.0,m2r==0.2.1,MarkupSafe==2.0.1,mistune==0.8.4,netifaces==0.11.0,oauthlib==3.2.0,packaging==21.3,pbr==5.8.1,Pygments==2.11.2,pyparsing==3.0.7,pyrsistent==0.18.0,pytz==2022.1,PyYAML==6.0,requests==2.27.1,restructuredtext-lint==1.4.0,six==1.16.0,snowballstemmer==2.2.0,Sphinx==4.2.0,sphinx-rtd-theme==1.0.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,stevedore==3.5.0,typing_extensions==4.1.1,urllib3==1.26.9,zipp==3.6.0
doc run-test-pre: PYTHONHASHSEED='3093027937'
doc run-test: commands[0] | /home/james/c/cloud-init/.tox/doc/bin/python -m sphinx doc/rtd doc/rtd_html
Running Sphinx v4.2.0

Exception occurred:
  File "/home/james/c/cloud-init/.tox/doc/lib/python3.6/site-packages/sphinx/registry.py", line 273, in add_source_parser
    for filetype in parser.supported:
AttributeError: 'str' object has no attribute 'supported'
The full traceback has been saved in /tmp/sphinx-err-jj_3k4hu.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
ERROR: InvocationError for command /home/james/c/cloud-init/.tox/doc/bin/python -m sphinx doc/rtd doc/rtd_html (exited with code 2)

Since we have another PR looking to update docs dependencies, I think we should pin here and upgrade there.

@blackboxsw
Copy link
Copy Markdown
Collaborator

With the set you listed I get:

$ tox -re doc
GLOB sdist-make: /home/james/c/cloud-init/setup.py
doc recreate: /home/james/c/cloud-init/.tox/doc
doc installdeps: -r/home/james/c/cloud-init/doc-requirements.txt
doc inst: /home/james/c/cloud-init/.tox/.tmp/package/1/cloud-init-22.1.zip
doc installed: alabaster==0.7.12,attrs==21.4.0,Babel==2.9.1,certifi==2021.10.8,charset-normalizer==2.0.12,cloud-init @ file:///home/james/c/cloud-init/.tox/.tmp/package/1/cloud-init-22.1.zip,configobj==5.0.6,doc8==0.10.1,docutils==0.17.1,idna==3.3,imagesize==1.3.0,importlib-metadata==4.8.3,Jinja2==3.0.3,jsonpatch==1.32,jsonpointer==2.2,jsonschema==3.2.0,m2r==0.2.1,MarkupSafe==2.0.1,mistune==0.8.4,netifaces==0.11.0,oauthlib==3.2.0,packaging==21.3,pbr==5.8.1,Pygments==2.11.2,pyparsing==3.0.7,pyrsistent==0.18.0,pytz==2022.1,PyYAML==6.0,requests==2.27.1,restructuredtext-lint==1.4.0,six==1.16.0,snowballstemmer==2.2.0,Sphinx==4.2.0,sphinx-rtd-theme==1.0.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,stevedore==3.5.0,typing_extensions==4.1.1,urllib3==1.26.9,zipp==3.6.0
doc run-test-pre: PYTHONHASHSEED='3093027937'
doc run-test: commands[0] | /home/james/c/cloud-init/.tox/doc/bin/python -m sphinx doc/rtd doc/rtd_html
Running Sphinx v4.2.0

Exception occurred:
  File "/home/james/c/cloud-init/.tox/doc/lib/python3.6/site-packages/sphinx/registry.py", line 273, in add_source_parser
    for filetype in parser.supported:
AttributeError: 'str' object has no attribute 'supported'
The full traceback has been saved in /tmp/sphinx-err-jj_3k4hu.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
ERROR: InvocationError for command /home/james/c/cloud-init/.tox/doc/bin/python -m sphinx doc/rtd doc/rtd_html (exited with code 2)

Since we have another PR looking to update docs dependencies, I think we should pin here and upgrade there.

Ahh right we'll hit both docutils pinned issues with this supplemental pin as well as mistune. Ok, as you proposed. Pin the fix for now. and adjust updates to later versions with @holmanb's PR.

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As discussed update all doc dependencies in a separate PR.

@blackboxsw blackboxsw merged commit f8179ad into canonical:main Mar 25, 2022
@TheRealFalcon TheRealFalcon deleted the doc-pin branch March 21, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants