Bug 1930874 - python-nikola FTBFS with Pygments 2.8
Summary: python-nikola FTBFS with Pygments 2.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nikola
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: José Matos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1928510
TreeView+ depends on / blocked
 
Reported: 2021-02-19 16:50 UTC by Charalampos Stratakis
Modified: 2021-07-06 17:50 UTC (History)
3 users (show)

Fixed In Version:
Clone Of: 1930799
: 1931521 (view as bug list)
Environment:
Last Closed: 2021-07-06 17:50:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Charalampos Stratakis 2021-02-19 16:50:22 UTC
Before the Pygments update a copr repo is set to test the dependant packages.

With Pygments 2.8, python-nikola is failing to build from source with:

=================================== FAILURES ===================================
_______________________ test_compiling_markdown[hilite] ________________________

compiler = <nikola.plugins.compile.markdown.CompileMarkdown object at 0x7f75586097f0>
input_path = '/tmp/pytest-of-mockbuild/pytest-2/test_compiling_markdown_hilite0/input.markdown'
output_path = '/tmp/pytest-of-mockbuild/pytest-2/test_compiling_markdown_hilite0/output.html'
input_str = '    #!python\n    from this\n'
expected_output = '<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"...ock"><span></span><code><span class="kn">from</span> <span class="nn">this</span>\n</code></pre>\n</td></tr></table>\n'

    @pytest.mark.parametrize(
        "input_str, expected_output",
        [
            pytest.param("", "", id="empty"),
            pytest.param(
                "[podcast]https://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3[/podcast]",
                '<p><audio controls=""><source src="https://archive.org/download/Rebeldes_Stereotipos/rs20120609_1.mp3" type="audio/mpeg"></source></audio></p>',
                id="mdx podcast",
            ),
            pytest.param(
                "~~striked out text~~",
                "<p><del>striked out text</del></p>",
                id="strikethrough",
            ),
            pytest.param(
                """\
        #!python
        from this
    """,
                """\
    <table class="codehilitetable"><tr><td class="linenos">\
    <div class="linenodiv"><pre>1</pre></div>\
    </td><td class="code"><pre class="code literal-block"><span></span>\
    <code><span class="kn">from</span> <span class="nn">this</span>
    </code></pre>
    </td></tr></table>
    """,
                id="hilite",
            ),
        ],
    )
    def test_compiling_markdown(
        compiler, input_path, output_path, input_str, expected_output
    ):
        output = markdown_compile(compiler, input_path, output_path, input_str)
>       assert output.strip() == expected_output.strip()
E       assert '<table class...</tr></table>' == '<table class...</tr></table>'
E         Skipping 73 identical leading characters in diff, use -v to show
E         - div"><pre>1</pre></div></td><td class="code"><pre class="code literal-block"><span></span><code><span class="kn">from</span> <span class="nn">this</span>
E         + div"><pre><span class="normal">1</span></pre></div></td><td class="code"><pre class="code literal-block"><span></span><code><span class="kn">from</span> <span class="nn">this</span>
E         ?           +++++++++++++++++++++ +++++++
E           </code></pre>
E           </td></tr></table>

tests/test_compile_markdown.py:46: AssertionError


Link to logs: https://download.copr.fedorainfracloud.org/results/cstratak/sphinx_3_5/fedora-34-x86_64/01970862-python-nikola/builder-live.log.gz

It seems that the issue would be fixed by this upstream commit:

https://github.com/getnikola/nikola/commit/e6c45385559c8d9d08c3e26ebe23ff258e46d8b7

Comment 1 José Matos 2021-02-20 09:00:13 UTC
(In reply to Charalampos Stratakis from comment #0)
> Before the Pygments update a copr repo is set to test the dependant packages.
> 
> With Pygments 2.8, python-nikola is failing to build from source with:
> [...] 
> It seems that the issue would be fixed by this upstream commit:
> 
> https://github.com/getnikola/nikola/commit/
> e6c45385559c8d9d08c3e26ebe23ff258e46d8b7

Thanks for the analysis, you are right about the fix.
What is the plan regarding the updated releases? Is this supposed to go only for branched (F34) and rawhide?

I am asking this because the fix is already applied upstream as you linked above for the next stable release 8.1.4.
Since this is a minor update, in a bug fix mode, I intend to release this for the stable releases F32 and F33.

And then if Pygments 2.8 is not available there I need to revert the patch. The opposite problem that we have now. :-)

In any case feel free to update that I will deal with the resulting builds.

Comment 2 Charalampos Stratakis 2021-02-20 18:43:18 UTC
(In reply to José Matos from comment #1)
> (In reply to Charalampos Stratakis from comment #0)
> > Before the Pygments update a copr repo is set to test the dependant packages.
> > 
> > With Pygments 2.8, python-nikola is failing to build from source with:
> > [...] 
> > It seems that the issue would be fixed by this upstream commit:
> > 
> > https://github.com/getnikola/nikola/commit/
> > e6c45385559c8d9d08c3e26ebe23ff258e46d8b7
> 
> Thanks for the analysis, you are right about the fix.
> What is the plan regarding the updated releases? Is this supposed to go only
> for branched (F34) and rawhide?
> 
> I am asking this because the fix is already applied upstream as you linked
> above for the next stable release 8.1.4.
> Since this is a minor update, in a bug fix mode, I intend to release this
> for the stable releases F32 and F33.
> 
> And then if Pygments 2.8 is not available there I need to revert the patch.
> The opposite problem that we have now. :-)
> 
> In any case feel free to update that I will deal with the resulting builds.

Not entirely sure yet as I intend to push it with the latest Sphinx release. However if the Sphinx fallout is too big, since we are past the mass rebuild of F34 I wouldn't push it there, only for rawhide.

So to answer more specifically, rawhide possibly from next week, and will see for F34.

Comment 3 Charalampos Stratakis 2021-03-11 14:47:18 UTC
Pygments has been updated on rawhide (It will not go on F34).

Comment 4 José Matos 2021-07-06 17:50:56 UTC
I was waiting for python-nikola 8.1.4 where the fix is already there. That did not happen so I picked the patch from upstream
https://bodhi.fedoraproject.org/updates/FEDORA-2021-3cd6cad88a


Note You need to log in before you can comment on or make changes to this bug.