Bug 2279858 - python-hdmf fails to build with pytest 8: TypeError: Can't instantiate abstract class BuildGroupExtAttrsMixin without an implementation for abstract method 'setUpBarHolderSpec'
Summary: python-hdmf fails to build with pytest 8: TypeError: Can't instantiate abstra...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-hdmf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-05-09 10:04 UTC by Tomáš Hrnčiar
Modified: 2024-05-29 19:56 UTC (History)
5 users (show)

Fixed In Version: python-hdmf-3.14.0-2.fc41
Clone Of:
Environment:
Last Closed: 2024-05-29 19:56:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github hdmf-dev hdmf issues 1114 0 None open [Bug]: Test collection fails for three tests with pytest 8.2.0 2024-05-14 14:28:36 UTC
Github pytest-dev pytest issues 12275 0 None closed v8.2.0 raises `Can't instantiate abstract class` when a test class implements an abstract class 2024-05-29 16:51:56 UTC

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.


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