-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
MarkupSafe and Jinja pins are preventing building documentation for new versions of MarkupSafe, Jinja, and Flask #9216
Comments
This is also preventing building Flask 2.0's docs, since it depends on Jinja2>3.0. |
Otherwise docs builds are broken due to sphinx-doc/sphinx#9216
Otherwise docs builds are broken due to sphinx-doc/sphinx#9216
@ericholscher Do you have any opinion on this unpinning? Would you like to test it before unpinning? |
btw, #9162 already fixed it but only in the 4.x branch |
We worked around this at the moment by pinning our Sphinx dependency to the 4.1 dev branch, but I would like to move back to a stable version when possible. |
Is it reasonable to request that this PR also get applied to the 4.0.x branch? My ad-hoc testing seems to demonstrate that the patch is also safe against the 4.0.x branch and doing so might get the updated dependencies into the stable build faster? |
This seems like a larger issue that we need to understand. Sphinx itself depends on a set of versions that are needed to run the software. How would it work if the new version of MarkUpSafe broke the version of Sphinx needed? Is this just something that is impossible to handle because Sphinx requires importing code in order to generate docs for it? |
While it's not possible to guarantee that a new release won't affect anything, I've tried to be much better about issuing deprecation warnings before removing things in a subsequent release. So it should have been safe to pin to Additionally, we've started talking about how we might work with the wider ecosystem to run tests against release candidates to make sure a new release doesn't disrupt essential projects like Sphinx. |
Indeed -- we're trying to work on this as well in the Sphinx ecosystem, which is how we ended up pinning our dependencies.
Gotcha -- I understand that hopefully the release won't break things, but I think pinning to the latest released version is a good practice for both security and stability. Arguably we should be moving towards a place where we are actually pinning a hash for the packaged version or similar, and validating that when upgrading dependencies. That's a longer term ideal, and not too relevant currently. I feel like the real bug issue here is figuring out how to generate docs for a Python library version different than one that is installed for Sphinx's use. I feel like I haven't hit this issue at all in the past, so I'm not quite sure why it would be happening now. Is Python enforcing the installed library requirements on import of the package, and that is what is breaking here? That seems like a weird outcome, and something that would effect the larger ecosystem, but we haven't seen reports of it. |
It looks like you're using |
@tk0miya FWIW, I recommend that we bump to the latest released versions, but I think this is still a symptom of a larger issue that we need to figure out, or at least document. |
This is now worse since Jinja3 version 3.0.x is out I just hit dependency hell which killed pip so I've had to remove sphinx from my app now because I need the newer versions of Jinja and MarkupSafe |
@ericholscher Thank you for your advice. I just posted #9251. |
Thanks, just rebuilt MarkupSafe with Sphinx 4.0.2 and Jinja 3.0.1, everything's working. |
The documentation fails to build because the Sphinx package that we are getting from defaults has incorrectly specified dependencies. See sphinx-doc/sphinx#9216 Instead pull a newer version, from conda forge that has this fixed.
I am currently releasing MarkupSafe 2.0 and Jinja2 3.0. Sphinx depends on
MarkupSafe<2.0
andJinja2<3.0
. We require Sphinx to build our docs, so we can't build the docs for MarkupSafe or Jinja2 until Sphinx stops pinning its dependency.The text was updated successfully, but these errors were encountered: