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

Support for sphinx >= 3 #115

Closed
NicolasHug opened this issue Apr 19, 2021 · 5 comments · Fixed by #139
Closed

Support for sphinx >= 3 #115

NicolasHug opened this issue Apr 19, 2021 · 5 comments · Fixed by #139

Comments

@NicolasHug
Copy link
Member

NicolasHug commented Apr 19, 2021

All of Pytorch, torchaudio, torchtext, and torchvision pin the sphinx version to 2.4.4 because of rendering issues when ugprading to sphinx 3 (pytorch/audio#972, pytorch/vision#3681)

For example this signature renders fine in 2.4.4:

image

But it doesn't render properly with sphinx 3 (various annotations are missing, etc.):

image

Are there plans to add support for sphinx>=3?

CC @brianjo @holly1238

@mthrok
Copy link

mthrok commented Jun 3, 2021

@NicolasHug @brianjo

This is caused by position: absolute of article.pytorch-article .function dt a, article.pytorch-article .attribute dt a, article.pytorch-article .class .attribute dt a, article.pytorch-article .class dt a selection. In chrome, removing this attribute makes it work.

Screen Shot 2021-06-03 at 17 00 06

Screen Shot 2021-06-03 at 16 59 59

If I do for file in $(grep -l 'position: absolute' $(find . -type f -name '*css')); do sed -i '' '/position: absolute;/d' $file; done and remove position: absolute, then the issue gets resolved.

I think the following line is causing the issue, but someone needs to build CSS and verify.

position: absolute;

@brianjo
Copy link
Contributor

brianjo commented Aug 2, 2021

We actually moved to 3.5.4 for docs, so I think we're good now. https://github.com/pytorch/pytorch/blob/master/docs/requirements.txt

@NicolasHug
Copy link
Member Author

NicolasHug commented Aug 2, 2021

@brianjo No, sphinx 3 is still broken for type annotations, please see #134 (comment) and #134 (comment)

Pytorch docs will be broken as soon as they start having signatures with type annotations.

@garymm
Copy link
Contributor

garymm commented Aug 2, 2021

There's a 1 line fixed suggested above. @NicolasHug can you try it out and send a PR if it fixes the issue?

@NicolasHug
Copy link
Member Author

Sorry, I have zero css ability, so unfortunately I can't assess the suitability of the proposed solution

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.

4 participants