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

resolve dependency issue with sphinx doc generation and m2r #22019

Closed
kristapratico opened this issue Dec 6, 2021 · 3 comments
Closed

resolve dependency issue with sphinx doc generation and m2r #22019

kristapratico opened this issue Dec 6, 2021 · 3 comments
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team.

Comments

@kristapratico
Copy link
Member

kristapratico commented Dec 6, 2021

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.

@kristapratico kristapratico added the Central-EngSys This issue is owned by the Engineering System team. label Dec 6, 2021
@kristapratico
Copy link
Member Author

For now, we're pinning mistune to <2.0.0 here:

[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
mistune<2.0.0
m2r==0.2.1

@ilCatania
Copy link

Thank you for reporting this, I had the same issue and pinning mistune also worked for me

mkhorton added a commit to materialsproject/crystaltoolkit that referenced this issue Dec 22, 2021
@scbedd
Copy link
Member

scbedd commented Feb 24, 2022

Additional fix commited by Krista here. Closing.

@scbedd scbedd closed this as completed Feb 24, 2022
brookwander pushed a commit to brookwander/crystaltoolkit that referenced this issue Sep 8, 2022
dixler pushed a commit to pulumi/docs that referenced this issue Mar 6, 2023
Pinned m2r < 2.0.0 according to suggestion in Azure/azure-sdk-for-python#22019 (comment)
Bumped Jinja2 to 3.1.2 in Pipenv according to discussion in SRserves85/avro-to-python#20
dixler pushed a commit to pulumi/docs that referenced this issue Mar 6, 2023
Pinned m2r < 2.0.0 according to suggestion in Azure/azure-sdk-for-python#22019 (comment)
Bumped Jinja2 to 3.1.2 in Pipenv according to discussion in SRserves85/avro-to-python#20
dixler pushed a commit to pulumi/docs that referenced this issue Mar 6, 2023
Pinned m2r < 2.0.0 according to suggestion in Azure/azure-sdk-for-python#22019 (comment)
Bumped Jinja2 to 3.1.2 in Pipenv according to discussion in SRserves85/avro-to-python#20
dixler pushed a commit to pulumi/docs that referenced this issue Mar 6, 2023
Pinned `m2r<2.0.0` according to suggestion in Azure/azure-sdk-for-python#22019 (comment)
Pinned `markupsafe==2.0.1` according to discussion in SRserves85/avro-to-python#20
justinvp pushed a commit to pulumi/docs that referenced this issue Mar 7, 2023
Pinned `m2r<2.0.0` according to suggestion in Azure/azure-sdk-for-python#22019 (comment)
Pinned `markupsafe==2.0.1` according to discussion in SRserves85/avro-to-python#20
dixler pushed a commit to pulumi/docs that referenced this issue Mar 7, 2023
Pinned `m2r<2.0.0` according to suggestion in Azure/azure-sdk-for-python#22019 (comment)
Pinned `markupsafe==2.0.1` according to discussion in SRserves85/avro-to-python#20
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
None yet
Development

No branches or pull requests

3 participants