mozilla / sphinx-js

Autodoc-style extraction into Sphinx for your JS project
https://pypi.python.org/pypi/sphinx-js/
MIT License
282 stars 81 forks source link

Allow py39+ compatible `parsimonious` version #184

Closed webknjaz closed 1 year ago

webknjaz commented 2 years ago

Currently, the users of sphinx-js will only be able to get parsimonious v0.7.0 which is about 5 years old and does not support Python 3.9 or higher. The newer versions of the 0.8.x stream fix the compatibility issues and are necessary sphinx-js to be usable under Python 3.10 and Python 3.9.

webknjaz commented 2 years ago

@erikrose any chance to get this in and release a hotfixed version?

jessesnyder commented 2 years ago

The Jinja2 version pin is also becoming a significant burden, preventing upgrading to Flask 2.x, for example.

lonnen commented 2 years ago

I've recently updated parsimonious with support for python 3.7 - 3.10. I'll get it up on pypi in the next day or two

lonnen commented 2 years ago

This should be ready to go -- https://pypi.org/project/parsimonious/0.9.0/

sylvestre commented 2 years ago

Lonnen (nice to see you here :) FYI: https://bugzilla.mozilla.org/show_bug.cgi?id=1763971

sylvestre commented 2 years ago

@willkg @erikrose would it be possible to land this and a tag/upload a new release? thanks

lonnen commented 2 years ago

@sylvestre hey, I'm the person you're looking for here, too

I've been working on this since getting that Parsimonious release shipped, over on #191. Back in Feb 2020 MarkupSafe/Jinja2/Sphinx entered a state of interdependent hell which is now resolved. Sphinx-JS was not changing or running CI at the time so it went unnoticed that we could not build. As a short term fix at the time, several projects pinned an old version of the MarkupSafe lib, though the Jinja2 dev team recommends updating Jinja2 to a recent working version rather than pinning.

While I was working on that #195 showed up. In order to fix CI and land #195 I accepted the short-term workaround change mentioned above noting that it will block an update to Jinja 3.x. Jinja 3.x requires us to also adopt Sphinx 4.x+, which brings a change to a utility function that wasn't intended to impact our domain but nevertheless causes sphinx-js to emit incorrect type annotations for arguments and errors.

While I've isolated the specific change in Sphinx causing us grief, I cannot figure out how get the sphinx-js code we control to work with this version of the library. Given this stall and the recent uptick in issues activity I suspect it's time to decompose #191 into smaller commits and clearer issues. This will enable us to get trunk as updated as possible without figuring out the Sphinx 4.x problem, and provide a more organized place for pointing new issues and workarounds for the same couple

I don't know that it will get things far enough along to satisfy the Mozilla build system issue, but I can at least clarify the state of things. I'll get started tomorrow.

sylvestre commented 2 years ago

oh, excellent, thanks :)

lonnen commented 1 year ago

Hey @webknjaz, thanks for the contribution. This is obviated by 84ee24d21526b26f820ff39b9ddbdb95ef4d0a51, which is landed now.

Note that this still doesn't make Parsimonious usable on 3.10 and I have not cut a new version for pypi (yet) I have a WIP branch extending CI to run for all currently supported versions of python, and you can check on that compatibility here: https://github.com/mozilla/sphinx-js/pull/207