-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Backporting docutils version pinning for 1.x, 2.x, and 3.x before 3.5.4 #9807
Comments
As these duplicates keep coming (e.g. #9811), maybe considering the long term support request for 1.x and 2.x may ease not only RTD users frustration but also the issue maintenance burden for Sphinx developers. The alternative to fix the Python errors in Docutils 0.18.1 could lead to undedected problems in the generated documentation pages because of the remaining changes to the HTML output: Docutils 0.17 and Docutils 0.18 contain incompatible changes that not only lead to the above errors but Both, Sphinx and 3rd party Documentation on pinning dependencies should make clear that pins to Sphinx versions below 3.5.4 must be amend with pins to Docutils. |
Great points! Agreed this seems like it should be solved at the packaging level. This doesn't just affect RTD users with old projects, it instead affects anyone using an old pinned version of Sphinx. @tk0miya if there is anything more that RTD can do here, our team is happy to help more. At very least, the Sphinx team doesn't need to be triaging issues from RTD users with old dependencies. But I think we'd be happy to maintain backports as well. |
@agjohnson Is it possible to pin docutils version for the projects that don't configure by new style on RTD side? I guess many users have still used Sphinx-1.8.5 because they don't migrate to the new style configuration. It means RTD can also pin the version of docutils for these projects. |
We are talking about pinning docutils 0.16 for users that would get Sphinx 1.8.5. However, this doesn't solve the problem for a considerable number of Sphinx users, and only addresses usage on RTD, not local installations. The reason some users still might get Sphinx 1.8.5 is:
However, this is only users using 1.8.5 on RTD. There are still a large number of Sphinx users installing Sphinx My math is Sphinx versions prior to 3.5.4, excluding 1.8.5 (which we can affect automatically). Sphinx 1.8.5 is 7-8% of Sphinx installations, and 32-38% of Sphinx installations in total can hit this issue with docutils. |
Error reports I saw are almost uses 1.8.5 and RTD. So I thought it's enough to fix it on RTD side. But no reason to pin it on Sphinx side. Okay, let's do it. BTW, what version of docutils is good for pinning for each Sphinx version? I'm okay for either 0.16 and 0.17. |
@gmilde also restored the backwards compatibility of Are these two decisions overlapping, or complementary? If the former, we need better coordination :) |
We have to take the statistics with a grain of salt, as downloads != installations:
For downloads since August 13, I computed 62% Sphinx versions with pin on Docutils Reasons for users keeping Sphinx 1.x are
The right thing to do would be to let Docutils 0.18 conflict with Sphinx <= 4.4. Unfortunately, I did not find a conflict mechanism similar to the one in Debian's apt for Python. The upcoming bugfix release Docutils 0.18.1 will restore the backwards compatibility of This leaves Sphinx 2.x and Sphinx 3.x (with x < 5.4) (ca. 20% of downloads in November) Downloads from Sphinx 2.x are less than 6% of total downloads in November. This leaves documentation:
or allowing bugfix releases:
Only with Sphinx versions >=3.5.4, this rule can be relaxed. |
Thanks @gmilde that's great news! We'll get our docs/blog updated. I haven't looked yet at the changes coming in docutils 1.0, but I assume we'll all probably have similar hurdles with unpinned dependencies from legacy Sphinx versions then too. So both fixes at docutils and Sphinx seem helpful to keeping releases a bit easier for everyone.
@tk0miya ping us if we can help at all here! We'll definitely do some testing on any of the releases though |
Anthony wrote:
After Docutils 18.1 rsp. r8885, compiling with legacy Sphinx versions should not fail until the planned removals in Docutils 1.2 (check for the DeprecationWarnings, e.g. in tests or running Remember: any backport release needs to be enabled by users that pin a specific Sphix version. Adding a pin on Docutils is not more work than changing a pin on Sphinx. Takeshi KOMIYA wrote:
¹An earlier incompatibility with Docutils 0.16 was fixed in Sphinx 1.3.2 (Nov 29, 2015). |
Really? The most reports I've seen are troubles in 1.8.5. So what we really need is v1.8.6 having a pin to the old docutils. IMO, almost (or very few) people do not mind either 0.16 or 0.17 because they did not get troubles since the release of docutils-0.17. I believe those who got troubles have already migrated to the new version. So my idea is:
|
Are there any tasks before releasing? If not, I'd like to ship the fixes soon. |
Soon ... I learned no release on weekends.
any objection ? |
I don't think there is anything from the RTD side. Once there are some versions to test we can keep an eye on project builds and provide feedback if there are any issues.
This will have to happen at some point before docutils 1.2 release anyways, but docutils 0.18.1 will make this less of a priority. If you have time for the releases, we can plan on monitoring projects using these releases.
Sounds reasonable. Tues is our release day, so we can add this to our list and monitor project builds with the new release. |
Now I just released v1.8.6 and v2.4.5 that pin docutils to <0.18. BTW, Sphinx-3.5.5 has already pinned. So I did not release v3.5.6. |
Thanks a lot @tk0miya ! |
as this one is closed , should docutils 0.18.1 still be rushed out or ... give it a week more beta ? |
Thank you, Takeshi, for the backport releases.
Am 18.11.21 schrieb engelbert gruber:
as this one is closed , should docutils 0.18.1 still be rushed out or
... give it a week more beta ?
Please go ahead as planned.
The Sphinx backport releases will not help
RTD users with "old" projects (pre 2020) pinned to Sphinx==1.8.5
by default or anyone using a pinned Sphinx version from before
May 2021 (e.g. for reproducible builds) but not pinning Docutils.
|
It's important to note that users of old pip versions might not benefit from this pinning... https://readthedocs.org/api/v2/build/15321608.txt
(source: https://twitter.com/s_bergmann/status/1461640620573958145) 🤦🏽♂️ |
IMO, docutils-0.18.1 resolves some of the troubles. But some of them will not be resolved. That's the reason why the latest Sphinx does not still support docutils-0.18. |
Hi Sphinx team!
I figured it would be best to open a separate issue to discuss solving the backwards incompatible changes from docutils 0.18 on older releases, separate from individual reports.
Sphinx maintainers used to maintain previous multiple releases with backports. Would the maintainers consider backporting version pinning for docutils for Sphinx 1.x and 2.x?
Based on numbers from PePy[1], Sphinx 1.x and 2.x release series still represent a fair amount of the install base. Comparing the latest in each major series, 1.x and 2.x are about 25% of installs still. This seems about accurate given the number of users requesting support around this issue on Read the Docs.
While encouraging users to upgrade to Sphinx
=>3.0
and Python 3 is absolutely a great idea, unfortunately the docutils changes are forcing this upgrade very abruptly for users. Upgrading to Sphinx=>3.0
is a fairly minor upgrade, but upgrading toPython 3
to run Sphinx 3.x is a lot to force on to users without much warning.For users that can't immediately upgrade, we're currently suggesting they manually pin docutils
=<0.18
. However, in order to get to that point, the user needs to hit the error from docutils 0.18, find one of the issues describing the backwards incompatibility, and then manually pin docutils. This is confusing users a lot, and it doesn't help that the error message from docutils is not helpful for users either.If this was solved at the package level, users wouldn't have to be confused about the docutils change at all, though I understand it's annoying to maintain backport releases.
Would the maintainers consider backporting to a Sphinx
1.x
and2.x
release, replicating the docutils pinning from Sphinx 3.x?1: https://pepy.tech/project/sphinx?versions=4.2.0&versions=3.5.4&versions=2.4.4&versions=1.8.5
Refs: readthedocs/readthedocs.org#8616
Refs: #9783
Refs: #9777
The text was updated successfully, but these errors were encountered: