RunestoneComponents icon indicating copy to clipboard operation
RunestoneComponents copied to clipboard

Breaking dependency issue with Python 3.10+

Open ascholerChemeketa opened this issue 3 years ago • 6 comments

Python 3.10 renames Union to UnionType which breaks the version of sphinx Runestone explicitly requires (3.5.4).

The current release of Sphinx (4.1.2) fixes the issue. Runestone seems to work correctly with that version of Sphinx based on a cursory attempt to build a book.

ascholerChemeketa avatar Oct 13 '21 16:10 ascholerChemeketa

Yes, but as you may remember Sphinx 4.x changes some of the fundamental layout structures of the html which breaks a bunch of our formatting. -- like no margins on the text and other stuff. I think you looked into it a little and reported that the basic layout from sphinx was now using more of the semantic tags, and was a bit of a project to go in and fix up.

bnmnetp avatar Oct 13 '21 17:10 bnmnetp

Right. Doh. As a short term fix maybe change the documentation on the main Readme?

Something like: Make sure you are using Python 3.7-3.9. Python 3.10+ have a breaking incompatibility with one of Runestone's current dependencies.

ascholerChemeketa avatar Oct 13 '21 17:10 ascholerChemeketa

Yesterday I tried a test build using Sphinx 4.2 and compared it to one using 3.5.x? They looked identical in terms of structure and the tags used.... Were you seeing margin problems in the build you did? In looking at the ChangeLogs for 4.x it appears they may have backed off the structural changes and deprecated the current html theme. This would be good news as it would allow us to use 4.x and buy us some time.

bnmnetp avatar Oct 19 '21 13:10 bnmnetp

I looked through the output using Sphinx 4.2 and Python 3.10 and do not see any visible issues either. I agree that it appears safe to upgrade.

ascholerChemeketa avatar Oct 19 '21 14:10 ascholerChemeketa

In the last few days I have figured out that it is not sphinx as much as docutils. I am currently on Sphinx 4.4 and docutils 0.16 but if we go to docutils 0.17.x things are messed up.

Thankfully sphinx is happy with docutils > 0.14 and < 0.18

I think that our efforts would be better spent working on the merger of Runestone and PreTeXt rather than a big effort to make the current processing work with docutils.

bnmnetp avatar Mar 08 '22 02:03 bnmnetp

I agree. I think it's import to get to Sphinx 4, but beyond that, use docutils that works and focus on PreTeXt.

bjones1 avatar Mar 08 '22 21:03 bjones1