Bug 2275052

Summary: python-pdir2 fails to install+build with Python 3.13: AssertionError: + property: + __static_attributes__
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-pdir2Assignee: Simon de Vlieger <cmdr>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: cmdr, fti-bugs, kparal, ksurma, mhroncok, python-packagers-sig, rosset.filipe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedFreezeException
Fixed In Version: python-pdir2-1.1.0-2.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-10-15 00:16:13 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: 2260875, 2260877, 2244836, 2247868    

Description Karolina Surma 2024-04-15 07:09:20 UTC
python-pdir2 fails to build with Python 3.13.0a6.

=================================== FAILURES ===================================
_______________________________ test_properties ________________________________

    def test_properties():
    
>       assert items_equal(
            [p.name for p in pdir(inst).properties.pattrs],
            [
                'base_class_variable',
                'base_instance_variable',
                'derived_class_variable',
                'derived_instance_variable',
                '__class__',
                '__dict__',
                '__doc__',
                '__module__',
                '__weakref__',
            ],
        )
E       AssertionError: assert False
E        +  where False = items_equal(['__class__', '__dict__', '__doc__', '__module__', '__static_attributes__', '__weakref__', ...], ['base_class_variable', 'base_instance_variable', 'derived_class_variable', 'derived_instance_variable', '__class__', '__dict__', ...])

tests/test_filters.py:45: AssertionError
___________________________________ test_own ___________________________________

    def test_own():
    
>       assert items_equal(
            [p.name for p in pdir(inst).own.pattrs],
            [
                'derived_method',
                '__init__',
                'base_instance_variable',
                'derived_class_variable',
                'derived_instance_variable',
                '__doc__',
                '__module__',
            ],
        )
E       AssertionError: assert False
E        +  where False = items_equal(['__doc__', '__init__', '__module__', '__static_attributes__', 'base_instance_variable', 'derived_class_variable', ...], ['derived_method', '__init__', 'base_instance_variable', 'derived_class_variable', 'derived_instance_variable', '__doc__', ...])

tests/test_filters.py:134: AssertionError
__________________________________ test_slots __________________________________

fake_tty = None

    def test_slots(fake_tty):
        import pdir
    
        class A:
            __slots__ = ['__mul__', '__hash__', 'a', 'b']
    
        a = A()
        result = pdir(a)
    
        if sys.version[0] == '2':
            expected = '\n'.join(
                [
                    '\x1b[0;33mspecial attribute:\x1b[0m',
                    (
                        '    \x1b[0;36m__class__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__doc__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__module__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__slots__\x1b[0m'
                    ),
                    '\x1b[0;33mabstract class:\x1b[0m',
                    '    \x1b[0;36m__subclasshook__\x1b[0m',
                    '\x1b[0;33marithmetic:\x1b[0m',
                    '    \x1b[0;36m__mul__\x1b[0m\x1b[0;35m(slotted)\x1b[0m',
                    '\x1b[0;33mobject customization:\x1b[0m',
                    (
                        '    \x1b[0;36m__format__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__hash__\x1b[0m'
                        '\x1b[0;35m(slotted)\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__init__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__new__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__repr__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__sizeof__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__str__\x1b[0m'
                    ),
                    '\x1b[0;33mattribute access:\x1b[0m',
                    (
                        '    \x1b[0;36m__delattr__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__getattribute__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__setattr__\x1b[0m'
                    ),
                    '\x1b[0;33mpickle:\x1b[0m',
                    (
                        '    \x1b[0;36m__getstate__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__reduce__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__reduce_ex__\x1b[0m'
                    ),
                    '\x1b[0;33mdescriptor:\x1b[0m',
                    (
                        '    \x1b[0;36ma\x1b[0m'
                        '\x1b[0;35m(slotted)\x1b[0m\x1b[0;36m: '
                        '\x1b[0m\x1b[1;30mclass member_descriptor with '
                        'getter, setter, deleter\x1b[0m'
                    ),
                    (
                        '    \x1b[0;36mb\x1b[0m'
                        '\x1b[0;35m(slotted)\x1b[0m\x1b[0;36m: '
                        '\x1b[0m\x1b[1;30mclass member_descriptor with '
                        'getter, setter, deleter\x1b[0m'
                    ),
                ]
            )
        else:
            expected = '\n'.join(
                [
                    '\x1b[0;33mspecial attribute:\x1b[0m',
                    (
                        '    \x1b[0;36m__class__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__doc__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__module__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__slots__\x1b[0m'
                    ),
                    '\x1b[0;33mabstract class:\x1b[0m',
                    '    \x1b[0;36m__subclasshook__\x1b[0m',
                    '\x1b[0;33marithmetic:\x1b[0m',
                    '    \x1b[0;36m__mul__\x1b[0m\x1b[0;35m(slotted)\x1b[0m',
                    '\x1b[0;33mobject customization:\x1b[0m',
                    (
                        '    \x1b[0;36m__format__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__hash__\x1b[0m'
                        '\x1b[0;35m(slotted)\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__init__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__new__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__repr__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__sizeof__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__str__\x1b[0m'
                    ),
                    '\x1b[0;33mrich comparison:\x1b[0m',
                    (
                        '    \x1b[0;36m__eq__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__ge__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__gt__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__le__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__lt__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__ne__\x1b[0m'
                    ),
                    '\x1b[0;33mattribute access:\x1b[0m',
                    (
                        '    \x1b[0;36m__delattr__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__dir__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__getattribute__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__setattr__\x1b[0m'
                    ),
                    '\x1b[0;33mclass customization:\x1b[0m',
                    '    \x1b[0;36m__init_subclass__\x1b[0m',
                    '\x1b[0;33mpickle:\x1b[0m',
                    (
                        '    \x1b[0;36m__getstate__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__reduce__\x1b[0m\x1b[1;30m, '
                        '\x1b[0m\x1b[0;36m__reduce_ex__\x1b[0m'
                    ),
                    '\x1b[0;33mdescriptor:\x1b[0m',
                    (
                        '    \x1b[0;36ma\x1b[0m'
                        '\x1b[0;35m(slotted)\x1b[0m\x1b[0;36m: '
                        '\x1b[0m\x1b[1;30mclass member_descriptor with '
                        'getter, setter, deleter\x1b[0m'
                    ),
                    (
                        '    \x1b[0;36mb\x1b[0m'
                        '\x1b[0;35m(slotted)\x1b[0m\x1b[0;36m: '
                        '\x1b[0m\x1b[1;30mclass member_descriptor with '
                        'getter, setter, deleter\x1b[0m'
                    ),
                ]
            )
>       assert repr(result) == expected
E       AssertionError: assert '\x1b[0;33mpr...eleter\x1b[0m' == '\x1b[0;33msp...eleter\x1b[0m'
E         + property:
E         +     __static_attributes__
E           special attribute:
E               __class__, __doc__, __module__, __slots__
E           abstract class:
E               __subclasshook__
E           arithmetic:...
E         
E         ...Full output truncated (14 lines hidden), use '-vv' to show

tests/test_pdir_format.py:353: AssertionError
__________________________ test_search_with_argument ___________________________

fake_tty = None

    def test_search_with_argument(fake_tty):
        import pdir
    
        class T:
            pass
    
        result, result2 = pdir(T).s('attr'), pdir(T).search('attr')
        result3, result4 = pdir(T).s('Attr'), pdir(T).search('Attr')
        expected = '\n'.join(
            [
                '\x1b[0;33mattribute access:\x1b[0m',
                (
                    '    \x1b[0;36m__delattr__\x1b[0m\x1b[1;30m, '
                    '\x1b[0m\x1b[0;36m__getattribute__\x1b[0m\x1b[1;30m, '
                    '\x1b[0m\x1b[0;36m__setattr__\x1b[0m'
                ),
            ]
        )
>       assert repr(result) == expected
E       AssertionError: assert '\x1b[0;33mpr...attr__\x1b[0m' == '\x1b[0;33mat...attr__\x1b[0m'
E         + property:
E         +     __static_attributes__
E           attribute access:
E               __delattr__, __getattribute__, __setattr__

tests/test_search.py:40: AssertionError
=========================== short test summary info ============================
FAILED tests/test_filters.py::test_properties - AssertionError: assert False
FAILED tests/test_filters.py::test_own - AssertionError: assert False
FAILED tests/test_pdir_format.py::test_slots - AssertionError: assert '\x1b[0...
FAILED tests/test_search.py::test_search_with_argument - AssertionError: asse...
============== 4 failed, 41 passed, 1 skipped, 1 xfailed in 0.17s ==============

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/07302921-python-pdir2/

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

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 Karolina Surma 2024-06-12 15:05:31 UTC
*** Bug 2291837 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Fails To Install 2024-06-19 19:59:10 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 3 Filipe Rosset 2024-08-06 02:55:56 UTC
opened 3.13 support request to upstream => https://github.com/laike9m/pdir2/issues/78

Comment 4 Karolina Surma 2024-09-04 15:01:53 UTC
This package has failed to build with Python 3.13 so far. Fedora 41 is already in the Beta Freeze phase. What's your plan going forward? Will the package be fixed in time for the Final Freeze of Fedora 41 (planned on Oct 15th 2024)?
If you don't plan or can't fix the package before Fedora 41 goes into the Final Freeze phase, please retire the package. You can unretire it anytime during the Fedora 41 lifecycle - doing this now will simply ensure that we don't release Fedora with a broken package. Thank you!

Comment 5 Fedora Update System 2024-10-06 09:57:17 UTC
FEDORA-2024-201a2e8591 (python-pdir2-1.1.0-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-201a2e8591

Comment 6 Simon de Vlieger 2024-10-06 09:59:31 UTC
I seem to have missed some emails from Bugzilla. I've submitted a patch upstream and applied it downstream, it's in updates and should be in before the freeze.

Comment 7 Fedora Fails To Install 2024-10-06 18:19:15 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 42.

Thanks for taking care of it!

Comment 8 Fedora Update System 2024-10-07 02:18:45 UTC
FEDORA-2024-201a2e8591 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-201a2e8591`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-201a2e8591

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Kamil Páral 2024-10-14 17:56:46 UTC
Discussed at a blocker review meeting [1], agreed on the following:

All six proposed FEs - 2291477 , 2291818 , 2275052 , 2291961 , 2301218 , 2283616 - are accepted as they are fails-to-install bugs and by precedent we accept these if there are no unusual factors involved, to keep the frozen tree as installable as possible

[1] https://meetbot-raw.fedoraproject.org//meeting_matrix_fedoraproject-org/2024-10-14/

Comment 10 Fedora Update System 2024-10-15 00:16:13 UTC
FEDORA-2024-201a2e8591 (python-pdir2-1.1.0-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.