pcs fails to build with Python 3.9.0b1. ERROR: test_success (pcs_test.tier0.cli.resource.test_relations.ShowResourceRelationsCmd) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/types.py", line 99, in _has_specified_inner_types return not type_._special File "/usr/lib64/python3.9/typing.py", line 639, in __getattr__ return getattr(self.__origin__, attr) AttributeError: type object 'Mapping' has no attribute '_special' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.9/unittest/mock.py", line 1337, in patched return func(*newargs, **newkeywargs) File "/builddir/build/BUILD/pcs-67591ed1487cb0aefa181fdfc166c8a66b55d25a/pcs_test/tier0/cli/resource/test_relations.py", line 100, in test_success relations.show_resource_relations_cmd( File "/builddir/build/BUILD/pcs-67591ed1487cb0aefa181fdfc166c8a66b55d25a/pcs/cli/resource/relations.py", line 37, in show_resource_relations_cmd dto.from_dict( File "/builddir/build/BUILD/pcs-67591ed1487cb0aefa181fdfc166c8a66b55d25a/pcs/common/interface/dto.py", line 40, in from_dict return dacite.from_dict( File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/core.py", line 59, in from_dict value = _build_value(type_=field.type, data=transformed_value, config=config) File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/core.py", line 86, in _build_value return from_dict(data_class=type_, data=data, config=config) File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/core.py", line 59, in from_dict value = _build_value(type_=field.type, data=transformed_value, config=config) File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/core.py", line 84, in _build_value return _build_value_for_collection(collection=type_, data=data, config=config) File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/core.py", line 107, in _build_value_for_collection if is_instance(data, Mapping): File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/types.py", line 79, in is_instance if not _has_specified_inner_types(type_): File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/types.py", line 101, in _has_specified_inner_types return bool(extract_generic(type_)) File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/types.py", line 115, in extract_generic return type_.__args__ # type: ignore File "/usr/lib64/python3.9/typing.py", line 640, in __getattr__ raise AttributeError(attr) AttributeError: __args__ See https://docs.python.org/3.9/whatsnew/changelog.html?highlight=__args__#id2 (search for __args__) "Removed attributes __args__ and __parameters__ from special generic aliases like typing.List (not subscripted)" https://bugs.python.org/issue40397 See similar related fixes in sphinx: https://github.com/sphinx-doc/sphinx/commit/46372726 And in hypothesis: https://github.com/HypothesisWorks/hypothesis/pull/2441 For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01396301-pcs/ For all our attempts to build pcs with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/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.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/ Let us know here if you have any questions. Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9. 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.
File "/builddir/build/BUILDROOT/pcs-0.10.5-4.fc33.x86_64/usr/lib/pcs/bundled/packages/dacite/types.py", line 99, in _has_specified_inner_types return not type_._special Try replacing it with: return not getattr(type_, '_special', False)
Thank you for reporting this issue and even suggesting a possible solution. The problem is in bundled library dacite so, I'll report this issue in their upstream and I'll update pcs package as soon as we have a patch.
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask. The Python 3.9 rebuild is in progress in a Koji side tag. If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with: $ fedpkg build --target=f33-python The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you. You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together. If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/
I filed an issue in dacite upstream: https://github.com/konradhalas/dacite/issues/98
Python 3.9 update: The f33-python side tag is currently being merged. New builds in f33-python are no longer possible, but python3 is not yet updated to Python 3.9 in rawhide. You can check when Python is Python 3.9 with: $ koji wait-repo f33-build --build python3.9-3.9.0~b1-3.fc3 And build the packages normally after that.
*** Bug 1841655 has been marked as a duplicate of this bug. ***
Temporarily we'll use a patched version of dacite (which works fine in our use case) until there is an upstream version with Python 3.9 support.
FEDORA-2020-0a4ce6ab7e has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.