Bug 2275057

Summary: python-munch fails to build with Python 3.13: test_reserved_attributes[__static_attributes__]: AssertionError: assert False where False = callable(('__class__', 'update'))
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-munchAssignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: infra-sig, kevin, ksurma, mhroncok, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-05 17:32:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2244836    

Description Karolina Surma 2024-04-15 07:28:12 UTC
python-munch fails to build with Python 3.13.0a6.

=================================== FAILURES ===================================
_______________ test_reserved_attributes[__static_attributes__] ________________

attrname = '__static_attributes__'

    @pytest.mark.parametrize("attrname", dir(Munch))
    def test_reserved_attributes(attrname):
        # Make sure that the default attributes on the Munch instance are
        # accessible.
    
        taken_munch = Munch(**{attrname: 'abc123'})
    
        # Make sure that the attribute is determined as in the filled collection...
        assert attrname in taken_munch
    
        # ...and that it is available using key access...
        assert taken_munch[attrname] == 'abc123'
    
        # ...but that it is not available using attribute access.
        attr = getattr(taken_munch, attrname)
        assert attr != 'abc123'
    
        empty_munch = Munch()
    
        # Make sure that the attribute is not seen contained in the empty
        # collection...
        assert attrname not in empty_munch
    
        # ...and that the attr is of the correct original type.
        attr = getattr(empty_munch, attrname)
        if attrname == '__doc__':
            assert isinstance(attr, str)
        elif attrname in ('__hash__', '__weakref__'):
            assert attr is None
        elif attrname == '__module__':
            assert attr == 'munch'
        elif attrname == '__dict__':
            assert attr == {}
        else:
>           assert callable(attr)
E           AssertionError: assert False
E            +  where False = callable(('__class__', 'update'))

tests/test_munch.py:229: AssertionError

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07302910-python-munch/

For all our attempts to build python-munch with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-munch/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 1 Miro HronĨok 2024-06-04 13:15:53 UTC
This blocks building fedpkg.