Skip to content

resolve dependency issue with sphinx doc generation and m2r #22019

@kristapratico

Description

@kristapratico

Seeing this error in the "Generate Docs" step of CI:

sphinx run-test: commands[0] | /mnt/vss/_work/1/s/sdk/core/azure-mgmt-core/.tox/sphinx/bin/python /mnt/vss/_work/1/s/sdk/core/azure-mgmt-core/../../../eng/tox/prep_sphinx_env.py -d /mnt/vss/_work/1/s/sdk/core/azure-mgmt-core/.tox/dist -t /mnt/vss/_work/1/s/sdk/core/azure-mgmt-core
Traceback (most recent call last):
  File "/mnt/vss/_work/1/s/sdk/core/azure-mgmt-core/../../../eng/tox/prep_sphinx_env.py", line 11, in <module>
    from m2r import parse_from_file
  File "/mnt/vss/_work/1/s/sdk/core/azure-mgmt-core/.tox/sphinx/lib/python3.6/site-packages/m2r.py", line 59, in <module>
    class RestBlockGrammar(mistune.BlockGrammar):
AttributeError: module 'mistune' has no attribute 'BlockGrammar'

Example build: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1231280&view=logs&j=3dc8fd7e-4368-5a92-293e-d53cefc8c4b3&t=651a14cc-88df-515d-1311-e0e8b23b578a

m2r is used in the tox sphinx env and depends on a library called mistune.

[testenv:sphinx]
skipsdist = false
skip_install = false
changedir = {toxinidir}
passenv = *
deps =
{[base]deps}
sphinx==3.5.4
sphinx_rtd_theme==0.5.0
recommonmark==0.6.0
m2r==0.2.1

mistune released a new package, 2.0.0, which appears to have breaking changes which are failing our CI.

Metadata

Metadata

Assignees

Labels

Central-EngSysThis issue is owned by the Engineering System team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions