Bug 2189446 - python-ruamel-yaml fails to build with Python 3.12: AssertionError: assert "ordereddict({'a': 1})" == "ordereddict([('a', 1)])"
Summary: python-ruamel-yaml fails to build with Python 3.12: AssertionError: assert "o...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ruamel-yaml
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Chandan Kumar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2192464
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2023-04-25 09:39 UTC by Tomáš Hrnčiar
Modified: 2023-05-04 23:29 UTC (History)
8 users (show)

Fixed In Version: python-ruamel-yaml-0.17.22-1.fc39
Clone Of:
Environment:
Last Closed: 2023-05-04 23:29:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2023-04-25 09:39:41 UTC
python-ruamel-yaml fails to build with Python 3.12.0a7.

=================================== FAILURES ===================================
_____________________ TestCommentedMapMerge.test_issue_60 ______________________

self = <test_comments.TestCommentedMapMerge object at 0x7f2abe725f10>

    def test_issue_60(self):
        data = round_trip_load("""
        x: &base
          a: 1
        y:
          <<: *base
        """)
        assert data['x']['a'] == 1
        assert data['y']['a'] == 1
>       assert str(data['y']) == """ordereddict([('a', 1)])"""
E       assert "ordereddict({'a': 1})" == "ordereddict([('a', 1)])"
E         - ordereddict([('a', 1)])
E         ?             ^^   ^   --
E         + ordereddict({'a': 1})
E         ?             ^   ^  +

_test/test_comments.py:520: AssertionError
____________________ TestCommentedMapMerge.test_issue_60_1 _____________________

self = <test_comments.TestCommentedMapMerge object at 0x7f2abe725df0>

    def test_issue_60_1(self):
        data = round_trip_load("""
        x: &base
          a: 1
        y:
          <<: *base
          b: 2
        """)
        assert data['x']['a'] == 1
        assert data['y']['a'] == 1
>       assert str(data['y']) == """ordereddict([('b', 2), ('a', 1)])"""
E       assert "ordereddict(...: 2, 'a': 1})" == "ordereddict(...), ('a', 1)])"
E         - ordereddict([('b', 2), ('a', 1)])
E         + ordereddict({'b': 2, 'a': 1})

_test/test_comments.py:532: AssertionError
___________________________ TestIssues.test_issue_61 ___________________________

self = <test_issues.TestIssues object at 0x7f2abe808fb0>

    def test_issue_61(self):
        s = dedent("""
        def1: &ANCHOR1
            key1: value1
        def: &ANCHOR
            <<: *ANCHOR1
            key: value
        comb:
            <<: *ANCHOR
        """)
        data = round_trip_load(s)
        assert str(data['comb']) == str(data['def'])
>       assert str(data['comb']) == "ordereddict([('key', 'value'), ('key1', 'value1')])"
E       assert "ordereddict(...': 'value1'})" == "ordereddict(..., 'value1')])"
E         - ordereddict([('key', 'value'), ('key1', 'value1')])
E         ?             ^^     ^        -  -      ^          --
E         + ordereddict({'key': 'value', 'key1': 'value1'})
E         ?             ^     ^                ^         +

_test/test_issues.py:30: AssertionError
=========================== short test summary info ============================
FAILED _test/test_comments.py::TestCommentedMapMerge::test_issue_60 - assert ...
FAILED _test/test_comments.py::TestCommentedMapMerge::test_issue_60_1 - asser...
FAILED _test/test_issues.py::TestIssues::test_issue_61 - assert "ordereddict(...
============= 3 failed, 390 passed, 5 skipped, 22 xfailed in 3.56s =============

gh-101446: Change repr of collections.OrderedDict to use regular dictionary formating instead of pairs of keys and values.

https://github.com/python/cpython/issues/101446
https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05840759-python-ruamel-yaml/

For all our attempts to build python-ruamel-yaml with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-ruamel-yaml/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 2 Tomáš Hrnčiar 2023-05-04 08:06:18 UTC
Thank you!


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