Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723468 - dev-python/recommonmark forces old dev-python/sphinx
Summary: dev-python/recommonmark forces old dev-python/sphinx
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 722500
  Show dependency tree
 
Reported: 2020-05-17 08:06 UTC by Michał Górny
Modified: 2021-02-06 22:35 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix recommonmark tests with sphinx-3 (recommonmark-0.6.0-tests-sphinx3.patch,3.52 KB, patch)
2020-11-23 19:28 UTC, Anon Emuss
Details | Diff
Fix disabled tests in recommonmark (recommonmark-0.6.0-tests-sphinx-html.patch,2.41 KB, patch)
2020-11-23 19:30 UTC, Anon Emuss
Details | Diff
Update recommonmark-0.6.0.ebuild to work with sphinx-3 (recommonmark-0.6.0.ebuild.patch,984 bytes, patch)
2020-11-23 19:35 UTC, Anon Emuss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-17 08:06:53 UTC
...and lacks any recent upstream activity.

Sadly, it has many revdeps.
Comment 1 Reva Denis 2020-09-28 08:14:13 UTC
Vote for solve that.
Comment 2 Anon Emuss 2020-11-14 05:34:12 UTC
Just a note that dev-python/recommonmark-0.6.0 appears to build and install correctly with dev-python/sphinx-3.2.1.  All that is needed is to patch the ebuild so it does not block dev-python/sphinx-3.2.1 (but see note below):

----- BEGIN PATCH -----
--- a/dev-python/recommonmark/recommonmark-0.6.0.ebuild
+++ b/dev-python/recommonmark/recommonmark-0.6.0.ebuild
@@ -19,7 +19,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x8
 RDEPEND="
        >=dev-python/commonmark-0.8.1[${PYTHON_USEDEP}]
        >=dev-python/docutils-0.14[${PYTHON_USEDEP}]
-       <dev-python/sphinx-3[${PYTHON_USEDEP}]
+       dev-python/sphinx[${PYTHON_USEDEP}]
 "
 
 distutils_enable_tests pytest
----- END PATCH -----

NOTE:  My system is not currently set up to run the tests (USE=test), so I did not check those.  Apparently, failing the tests is why that restriction was added in the first place (see Gentoo bug #720014).  I may try looking into that if time permits.
Comment 3 gerion 2020-11-18 10:24:38 UTC
This is especially tricky when enabling Python 3.9 support.

Sphinx 2.4.4 lacks Python 3.9 support but 3.2.1 have it. This causes Portage to pull in Sphinx 3.2.1, when emerging any sphinx helper package even when specifying "=sphinx-2.2.4" on the command line. This also prevents a system update, when enabling Python 3.9.

The following command has fixed it for me (discovered with a lot of try and error, portage is not good in resolving this problem):
```
emerge -a1 "=sphinx-2.4.4" sphinxcontrib-jsmath sphinxcontrib-qthelp sphinxcontrib-devhelp sphinxcontrib-serializinghtml sphinxcontrib-applehelp sphinxcontrib-htmlhelp dev-python/breathe dev-python/sphinx_rtd_theme recommonmark
```

Together with theses extra use flags:
```
=dev-python/breathe-4.14.1 -python_targets_python3_9
=dev-python/sphinx_rtd_theme-0.4.3-r1 -python_targets_python3_9
=dev-python/sphinxcontrib-applehelp-1.0.2 -python_targets_python3_9
=dev-python/sphinxcontrib-devhelp-1.0.2 -python_targets_python3_9
=dev-python/sphinxcontrib-htmlhelp-1.0.3 -python_targets_python3_9
=dev-python/sphinxcontrib-jsmath-1.0.1-r1 -python_targets_python3_9
=dev-python/sphinxcontrib-qthelp-1.0.3 -python_targets_python3_9
=dev-python/sphinxcontrib-serializinghtml-1.1.4 -python_targets_python3_9
```
Comment 4 Anon Emuss 2020-11-23 19:28:32 UTC
Created attachment 674560 [details, diff]
Fix recommonmark tests with sphinx-3

The conf.py files in the recommonmark tests were using a deprecated variable that no longer works with dev-python/sphinx-3.2.1.  Modify the files to use one of the recommended ways of using recommonmark with sphinx.

This was tested and appears to work with dev-python/sphinx-2.4.4 and dev-python/sphinx-3.2.1.
Comment 5 Anon Emuss 2020-11-23 19:30:37 UTC
Created attachment 674563 [details, diff]
Fix disabled tests in recommonmark

recommonmark-0.6.0.ebuild disables some of the tests in recommonmark.  It appears they fail to work because newer versions of sphinx produce slightly different HTML tags than the tests expected.  Modify the tests to expect this newer HTML.

This was tested and appears to work with dev-python/sphinx-2.4.4 and dev-python/sphinx-3.2.1.
Comment 6 Anon Emuss 2020-11-23 19:35:03 UTC
Created attachment 674566 [details, diff]
Update recommonmark-0.6.0.ebuild to work with sphinx-3

An attempt to modify the recommonmark-0.6.0.ebuild to work with >=dev-python/sphinx-3.

List of the changes:
1) Change the RDEPEND atom to work with any version of dev-python/sphinx, not just <dev-python/sphinx-3.
2) Apply the patches allowing recommonmark-0.6.0 to install with FEATURES=test and with either of the currently-stable sphinx versions (dev-python/sphinx-2.4.4 and dev-python/sphinx-3.2.1).
3) Remove the code that disables certain of the tests, as they should now all work with the currently-stable sphinx versions.
Comment 7 Anon Emuss 2020-11-23 19:38:16 UTC
I think I have gotten recommonmark-0.6.0 to work with sphinx-3, even with USE='doc test' and FEATURES=test.  I have included the patches that allow it to work on my system.  If I see any comments that there are still problems with this, and I have what it takes to investigate, I will try to look into it.
Comment 8 Benjamin Réveillé 2020-11-24 16:07:00 UTC
2 "files" patches + modified ebuild from Comments 2 to 4 worked for me
Comment 9 Bernd 2020-12-22 11:09:08 UTC
Had the issues noted in this bug too, so I checked upstream and noted they just released 0.7.1 a few days ago.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-12-22 12:36:37 UTC
(In reply to Anon Emuss from comment #4)
> Created attachment 674560 [details, diff] [details, diff]
> Fix recommonmark tests with sphinx-3

Please get this merged upstream.

(In reply to Bernd from comment #9)
> Had the issues noted in this bug too, so I checked upstream and noted they
> just released 0.7.1 a few days ago.

The new release doesn't resolve any of the problems, so I didn't bother bumping.
Comment 11 Bernd 2020-12-22 13:46:58 UTC
(In reply to Michał Górny from comment #10)
> The new release doesn't resolve any of the problems, so I didn't bother
> bumping.

Noticed that, it still needs the two patches from Anon Enuss to work.
Comment 12 Yarda 2021-01-01 22:44:42 UTC
The dev-python/sphinx-3.2.1 is stable. I hit this problem when trying to upgrade sys-devel/llvm to 11.0.0 (stable) with the USE=doc which pulled in dev-python/recommonmark which wanted to downgrade sphinx to 2.4.4. This gave me slot conflict on stable which wasn't straightforward to diagnose. I think this is causing more problems.
Comment 13 gentoo 2021-01-27 04:12:45 UTC
I have run into the same thing as the previous commenters. The upstream seems to be inactive. What's the alternative here?
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-27 04:18:26 UTC
(In reply to gentoo from comment #13)
> I have run into the same thing as the previous commenters. The upstream
> seems to be inactive. What's the alternative here?

I guess we need to see if Anon Emuss' patches are sufficient.
Comment 15 Larry the Git Cow gentoo-dev 2021-02-06 22:34:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c50d11118861065aabb2d61767cd89832babef2

commit 0c50d11118861065aabb2d61767cd89832babef2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-02-06 22:33:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-02-06 22:33:32 +0000

    dev-python/recommonmark: fix tests with Sphinx 3
    
    Thanks-to: Anon Emuss <abuslbea@centurylink.net>
    Bug: https://bugs.gentoo.org/769140
    Bug: https://bugs.gentoo.org/720014
    Closes: https://bugs.gentoo.org/723468
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/recommonmark-0.6.0-sphinx3-1.patch       | 122 +++++++++++++++++++++
 .../files/recommonmark-0.6.0-sphinx3-2.patch       |  63 +++++++++++
 .../recommonmark/recommonmark-0.6.0-r1.ebuild      |  30 +++++
 3 files changed, 215 insertions(+)