Bug 2279858

Summary: python-hdmf fails to build with pytest 8: TypeError: Can't instantiate abstract class BuildGroupExtAttrsMixin without an implementation for abstract method 'setUpBarHolderSpec'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-hdmfAssignee: Sandro <gui1ty>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bazanluis20, gui1ty, mhroncok, neuro-sig, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-hdmf-3.14.0-2.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-29 19:56:28 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: 2256331    

Description Tomáš Hrnčiar 2024-05-09 10:04:28 UTC
python-hdmf fails to build with pytest 8.


==================================== ERRORS ====================================
______ ERROR collecting tests/unit/build_tests/mapper_tests/test_build.py ______
/usr/lib/python3.12/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.12/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.12/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.12/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class BuildGroupExtAttrsMixin without an implementation for abstract method 'setUpBarHolderSpec'
______ ERROR collecting tests/unit/build_tests/mapper_tests/test_build.py ______
/usr/lib/python3.12/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.12/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.12/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.12/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class BuildDatasetExtAttrsMixin without an implementation for abstract method 'get_refined_bar_data_spec'
_________ ERROR collecting tests/unit/validator_tests/test_validate.py _________
/usr/lib/python3.12/site-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.12/site-packages/_pytest/runner.py:389: in collect
    return list(collector.collect())
/usr/lib/python3.12/site-packages/_pytest/unittest.py:90: in collect
    self.session._fixturemanager.parsefactories(self.newinstance(), self.nodeid)
/usr/lib/python3.12/site-packages/_pytest/unittest.py:75: in newinstance
    return self.obj("runTest")
E   TypeError: Can't instantiate abstract class ValidatorTestBase without an implementation for abstract method 'getSpecs'
=========================== short test summary info ============================
ERROR tests/unit/build_tests/mapper_tests/test_build.py::BuildGroupExtAttrsMixin
ERROR tests/unit/build_tests/mapper_tests/test_build.py::BuildDatasetExtAttrsMixin
ERROR tests/unit/validator_tests/test_validate.py::ValidatorTestBase - TypeEr...
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 3 errors in 1.60s ===============================

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07388981-python-hdmf/

For all our attempts to build python-hdmf with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-hdmf/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

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 Sandro 2024-05-14 14:28:37 UTC
This seems to be another issue with test collection in pytest 8.x. I tried what I tried before, using an empty directory, but it didn't make a difference this time around.

For now, the issue has been reported upstream.

Comment 2 Sandro 2024-05-29 16:51:56 UTC
It's a regression introduced in pytest 8.2.0. Upstream already merged a fix. But that is not going to be backported to 8.2.x. It will be in 8.3.0, though.

Comment 3 Fedora Update System 2024-05-29 19:53:32 UTC
FEDORA-2024-609ddc68a8 (python-hdmf-3.14.0-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-609ddc68a8

Comment 4 Fedora Update System 2024-05-29 19:56:28 UTC
FEDORA-2024-609ddc68a8 (python-hdmf-3.14.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.