Bug 2350300 - Heads-up: python-pymdown-extensions fails to build with python-pygments 2.19.1 on Fedora 43
Summary: Heads-up: python-pymdown-extensions fails to build with python-pygments 2.19....
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pymdown-extensions
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Davide Cavalca
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14 F43FTBFS, RAWHIDEFTBFS 2335657
TreeView+ depends on / blocked
 
Reported: 2025-03-06 11:27 UTC by Karolina Surma
Modified: 2025-03-19 09:35 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-03-06 11:27:10 UTC
python-pymdown-extensions fails to build with python-pygments 2.19.1 in Fedora 43.
I intend to update python-pygments in Fedora Rawhide in ~1 week.

There may be an upstream solution to the issue (not tested), see:
https://github.com/facelessuser/pymdown-extensions/commit/4745949c8c46fab76ce188562b7b05f42a0b8ac0

The example failure:

__________________________ test_extensions[compare51] __________________________

compare = (OrderedDict({'extensions': OrderedDict({'pymdownx.highlight': OrderedDict({'extend_pygments_lang': [OrderedDict({'nam...-pymdown-extensions-10.12-build/pymdown_extensions-10.12/tests/extensions/superfences/superfences (preserve tabs).txt')

    def test_extensions(compare):
        """Test extensions."""
    
>       compare_results(*compare)

tests/test_syntax.py:150: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_syntax.py:51: in compare_results
    check_markdown(testfile, extension, extension_config, wrapper, update)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

testfile = '/builddir/build/BUILD/python-pymdown-extensions-10.12-build/pymdown_extensions-10.12/tests/extensions/superfences/superfences (preserve tabs).txt'
extension = ['pymdownx.highlight', 'pymdownx.superfences']
extension_config = {'pymdownx.highlight': OrderedDict({'extend_pygments_lang': [OrderedDict({'name': 'php-inline', 'lang': 'php', 'option...ct({'name': 'sequence', 'class': 'uml-sequence-diagram', 'format': <function fence_code_format at 0x7f60d60b25c0>})]})}
wrapper = '%s', update = False

    def check_markdown(testfile, extension, extension_config, wrapper, update=False):
        """Check the markdown."""
    
        expected_html = os.path.splitext(testfile)[0] + '.html'
        with codecs.open(testfile, 'r', encoding='utf-8') as f:
            source = f.read()
    
        results = wrapper % markdown.Markdown(
            extensions=extension, extension_configs=extension_config
        ).convert(source)
    
        try:
            with codecs.open(expected_html, 'r', encoding='utf-8') as f:
                expected = f.read().replace("\r\n", "\n")
        except Exception:
            expected = ''
    
        diff = list(
            difflib.unified_diff(
                expected.splitlines(True),
                results.splitlines(True),
                expected_html,
                os.path.join(os.path.dirname(testfile), 'results.html'),
                n=3
            )
        )
        if diff:
            if update:
                print('Updated: %s' % expected_html)
                with codecs.open(expected_html, 'w', encoding='utf-8') as f:
                    f.write(results)
            else:
>               raise Exception(
                    'Output from "%s" failed to match expected '
                    'output.\n\n%s' % (testfile, ''.join(diff))
E                   Exception: Output from "/builddir/build/BUILD/python-pymdown-extensions-10.12-build/pymdown_extensions-10.12/tests/extensions/superfences/superfences (preserve tabs).txt" failed to match expected output.
E                   
E                   --- /builddir/build/BUILD/python-pymdown-extensions-10.12-build/pymdown_extensions-10.12/tests/extensions/superfences/superfences (preserve tabs).html
E                   +++ /builddir/build/BUILD/python-pymdown-extensions-10.12-build/pymdown_extensions-10.12/tests/extensions/superfences/results.html
E                   @@ -86,9 +86,9 @@
E                    <span class="normal">2</span>
E                    <span class="normal">3</span>
E                    <span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="sd">&quot;&quot;&quot;Some file.&quot;&quot;&quot;</span>
E                   -<span class="kn">import</span> <span class="nn">foo.bar</span>
E                   -<span class="kn">import</span> <span class="nn">boo.baz</span>
E                   -<span class="kn">import</span> <span class="nn">foo.bar.baz</span>
E                   +<span class="kn">import</span><span class="w"> </span><span class="nn">foo.bar</span>
E                   +<span class="kn">import</span><span class="w"> </span><span class="nn">boo.baz</span>
E                   +<span class="kn">import</span><span class="w"> </span><span class="nn">foo.bar.baz</span>
E                    </code></pre></div></td></tr></table></div>
E                    </li>
E                    <li>
E                   @@ -97,9 +97,9 @@
E                    <span class="normal">2</span>
E                    <span class="normal">3</span>
E                    <span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="sd">&quot;&quot;&quot;Some file.&quot;&quot;&quot;</span>
E                   -<span class="hll"><span class="kn">import</span> <span class="nn">foo.bar</span>
E                   -</span><span class="hll"><span class="kn">import</span> <span class="nn">boo.baz</span>
E                   -</span><span class="kn">import</span> <span class="nn">foo.bar.baz</span>
E                   +<span class="hll"><span class="kn">import</span><span class="w"> </span><span class="nn">foo.bar</span>
E                   +</span><span class="hll"><span class="kn">import</span><span class="w"> </span><span class="nn">boo.baz</span>
E                   +</span><span class="kn">import</span><span class="w"> </span><span class="nn">foo.bar.baz</span>
E                    </code></pre></div></td></tr></table></div>
E                    </li>
E                    <li>

tests/test_syntax.py:86: Exception


The testing takes place in COPR:
https://copr.fedorainfracloud.org/coprs/ksurma/pygments-2.19.1-f43/package/python-pymdown-extensions


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