Bug 2350304 - Heads-up: python-stack-data fails to build with python-pygments 2.19.1 on Fedora 43
Summary: Heads-up: python-stack-data fails to build with python-pygments 2.19.1 on Fed...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-stack-data
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14 F43FTBFS, RAWHIDEFTBFS 2335657
TreeView+ depends on / blocked
 
Reported: 2025-03-06 11:33 UTC by Karolina Surma
Modified: 2025-03-19 09:35 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Karolina Surma 2025-03-06 11:33:37 UTC
python-stack-data fails to build with python-pygments 2.19.1 in Fedora 43.
I intend to update python-pygments in Fedora Rawhide in ~1 week.

It was already reported upstream, see:
https://github.com/alexmojaki/stack_data/issues/60

The failure:

_________________________________ test_example _________________________________

    def test_example():
        from .samples.formatter_example import bar, format_frame, format_stack1
    
        result = dict(
            format_frame=(format_frame(MyFormatter())),
            format_stack=format_stack1(MyFormatter(show_variables=True)),
        )
    
        try:
            bar()
        except Exception:
            result.update(
                plain=MyFormatter(show_variables=True).format_exception(),
                pygmented=MyFormatter(show_variables=True, pygmented=True).format_exception(),
                pygmented_html=MyFormatter(show_variables=True, pygmented=True, html=True).format_exception(),
            )
    
    
>       compare_to_file_json(result, "serialize", pygmented=True)

tests/test_serializer.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

data = {'format_frame': {'filename': 'formatter_example.py', 'lineno': 51, 'lines': [{'is_current': False, 'lineno': 49, 'tex...ormatter_example.py', 'lineno': 8, 'lines': [{...}, {...}, {...}, {...}], 'name': 'foo', ...}, ...], 'tail': ''}], ...}
name = 'serialize'

    def compare_to_file_json(data, name, *, pygmented):
        if old_pygments and pygmented:
            return
        filename = os.path.join(
            os.path.dirname(__file__),
            'golden_files',
            name + '.json',
        )
        if os.environ.get('FIX_STACK_DATA_TESTS'):
            json_to_file(data, filename, indent=4)
        else:
            expected_output = file_to_json(filename)
>           assert data == expected_output
E           AssertionError

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


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