Bug 1899947 - pcs fails to build with Python 3.10: AttributeError: type object '_FailedTest' has no attribute 'pcs_test'
Summary: pcs fails to build with Python 3.10: AttributeError: type object '_FailedTest...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pcs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Mular
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-20 12:37 UTC by Tomáš Hrnčiar
Modified: 2020-11-26 11:30 UTC (History)
9 users (show)

Fixed In Version: pcs-0.10.7-2.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-26 11:30:19 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-20 12:37:10 UTC
pcs fails to build with Python 3.10.0a2.

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

======================================================================
ERROR: test_has_all_subclasses_are_dataclasses (pcs_test.tier0.common.interface.test_dto.DatatransferObjectTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pcs-0.10.7/pcs_test/tier0/common/interface/test_dto.py", line 27, in test_has_all_subclasses_are_dataclasses
    _import_all(pcs.__path__)
  File "/builddir/build/BUILD/pcs-0.10.7/pcs_test/tier0/common/interface/test_dto.py", line 17, in _import_all
    loader.find_module(module_name).load_module(module_name)
  File "<frozen importlib._bootstrap_external>", line 470, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 970, in load_module
  File "<frozen importlib._bootstrap_external>", line 795, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 791, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/acl.py", line 1, in <module>
    from pcs import (
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/prop.py", line 4, in <module>
    from pcs import utils
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/utils.py", line 43, in <module>
    from pcs.cli.common import middleware
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/cli/common/middleware.py", line 4, in <module>
    from pcs.cli.reports.output import error
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/cli/reports/__init__.py", line 1, in <module>
    from . import messages, output
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/cli/reports/messages.py", line 447, in <module>
    REPORT_MSG_MAP = _create_report_msg_map()
  File "/builddir/build/BUILD/pcs-0.10.7/pcs/cli/reports/messages.py", line 437, in _create_report_msg_map
    code = report_msg_cls.__annotations__.get(
AttributeError: 'str' object has no attribute '_code'

======================================================================
ERROR: pcs_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: type object '_FailedTest' has no attribute 'pcs_test'

----------------------------------------------------------------------
Ran 4948 tests in 18.942s

FAILED (errors=13)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01772993-pcs/

For all our attempts to build pcs with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/pcs/

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

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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.


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