[Debian-astro-maintainers] Bug#1026004: sunpy FTBFS with Python 3.11

Adrian Bunk bunk at debian.org
Tue Dec 13 07:18:05 GMT 2022


Source: sunpy
Version: 4.0.6-1
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/fetch.php?pkg=sunpy&arch=amd64&ver=4.0.6-1%2Bb1&stamp=1670443464&raw=0

...
===================================================================================== FAILURES =====================================================================================
__________________________________________________________________________ test_popitem_with_keycomments ___________________________________________________________________________

atomic_weights_keycomments = [['hydrogen', 1], ['chromium', 24], ['mercury', 80], ['iridium', 77], ['keycomments', {'MERCURY': 'Hg', 'chromium': 'Cr', 'extra key 1': 'foo', 'extra key 2': 'bar'}]]
empty_keycomments = [['keycomments', {}]]

    def test_popitem_with_keycomments(atomic_weights_keycomments, empty_keycomments):
        """
        Test `MetaDict.popitem(...)` removes corresponding keycomments.
        """
        md = MetaDict(atomic_weights_keycomments)
    
        assert md.popitem(last=False) == ('hydrogen', 1)
        assert md.popitem(last=False) == ('chromium', 24)
        assert md.popitem(last=False) == ('mercury', 80)
        assert md.popitem(last=False) == ('iridium', 77)
>       check_contents_and_insertion_order(md, empty_keycomments)

sunpy/util/tests/test_metadata.py:389: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sunpy/util/tests/test_metadata.py:47: in check_contents_and_insertion_order
    check_contents(metadict_inst, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

metadict_inst = MetaDict([('keycomments', {'chromium': 'Cr', 'MERCURY': 'Hg'})]), expected = [['keycomments', {}]]

    def check_contents(metadict_inst, expected):
        """
        Ensure that the key/values of `metadict_inst` match those of the key/value
        pairs in `expected`.
    
        The case of the keys is ignored, as is the order.
        """
        assert len(metadict_inst) == len(expected)
    
        for key, val in expected:
>           assert metadict_inst[key.upper()] == val
E           AssertionError: assert {'MERCURY': '...romium': 'Cr'} == {}
E             Left contains 2 more items:
E             {'MERCURY': 'Hg', 'chromium': 'Cr'}
E             Use -v to get more diff

sunpy/util/tests/test_metadata.py:19: AssertionError
================================================================================= warnings summary =================================================================================
../../../../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1252
  /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1252: PytestConfigWarning: Unknown config option: mpl-results-path
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

../../../../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1252
  /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1252: PytestConfigWarning: Unknown config option: mpl-use-full-test-name
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================= short test summary info ==============================================================================
FAILED sunpy/util/tests/test_metadata.py::test_popitem_with_keycomments - AssertionError: assert {'MERCURY': '...romium': 'Cr'} == {}
===================================== 1 failed, 2204 passed, 278 skipped, 10 deselected, 5 xfailed, 2 xpassed, 2 warnings in 118.82s (0:01:58) =====================================
E: pybuild pybuild:386: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_sunpy/build; python3.11 -m pytest -k "not figure and not online"
...


This is different from #1024248, which seems to be temporarily fixed
by shipping a release and not a git snapshot.



More information about the Debian-astro-maintainers mailing list