Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docutils 0.21 has removed nodes.reprunicode() and therefore building documentation using m2r2 fails #68

Open
galadash opened this issue Apr 17, 2024 · 1 comment · May be fixed by #69

Comments

@galadash
Copy link

Our regular Jenkins pipelines to generate documentation have started failing due to a dependency issue caused by a new release of docutils:
view change history here

  • docutils/nodes.py
    • Remove compatibility hacks nodes.reprunicode and nodes.ensure_str().

the following error is raised:

2024-04-17 16:32:18  Exception occurred:
2024-04-17 16:32:18    File "/data/jenkins/workspace/gda-project_gda-bb-utils_main/venv/lib/python3.10/site-packages/m2r2.py", line 611, in run
2024-04-17 16:32:18      path = nodes.reprunicode(path)
2024-04-17 16:32:18  AttributeError: module 'docutils.nodes' has no attribute 'reprunicode'

m2r2 only states a minimum requirement for docutils, and therefore my pipeline fails.
my pipeline exists of the following commands in case this can be of any help:

python3 -m pip install sphinx
python3 -m pip install sphinxcontrib-confluencebuilder
python3 -m pip install autoclasstoc
python3 -m pip install m2r2
sphinx-build -b confluence ./doc/source ./build/confluence

Unfortunately, I'm out of time for today, and if necessary I will add more information tomorrow!

@galadash
Copy link
Author

Just an update:

I found out this issue actually ONLY came to light after Sphinx's update on April 16 (2 days ago).
Sphinx 7.3.0 changes
Sphinx PR #11411
Before that update, as Sphinx was installed before m2r2, it would be leading to install its dependencies, and would have used "docutils>=0.18.1,<0.21",

Current Workaround is to fix the version in my requirements.txt (installed in a previous step in our Jenkins Pipeline) to fix the docutils==0.20.1 or docutils>0.21

@adrien-berchet adrien-berchet linked a pull request Apr 18, 2024 that will close this issue
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 a pull request may close this issue.

1 participant