Bug 1793005 - python-ruamel-yaml fails to build with Python 3.9: imports abc from collections
Summary: python-ruamel-yaml fails to build with Python 3.9: imports abc from collections
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ruamel-yaml
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Chandan Kumar
QA Contact: Fedora Extras Quality Assurance
URL: https://bitbucket.org/ruamel/yaml/iss...
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-20 13:43 UTC by Miro Hrončok
Modified: 2020-01-20 21:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-20 21:33:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-20 13:43:52 UTC
python-ruamel-yaml fails to build with Python 3.9.0a2.

=================================== FAILURES ===================================
_________________________ test_collections_deprecation _________________________
    @pytest.mark.skipif(sys.version_info < (3, 7), reason='collections not available?')
    def test_collections_deprecation():
        with pytest.warns(DeprecationWarning):
>           from collections import Hashable  # NOQA
E           ImportError: cannot import name 'Hashable' from 'collections' (/usr/lib64/python3.9/collections/__init__.py)
_test/test_deprecation.py:12: ImportError
========= 1 failed, 391 passed, 4 skipped, 22 xfailed in 7.28 seconds ==========

See https://docs.python.org/3.9/whatsnew/3.9.html#removed

"The abstract base classes in collections.abc no longer are exposed in the regular collections module. This will help create a clearer distinction between the concrete classes and the abstract base classes."


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01162149-python-ruamel-yaml/

For all our attempts to build python-ruamel-yaml with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-ruamel-yaml/

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.

Comment 1 Jason Montleon 2020-01-20 16:47:04 UTC
I filed a bug upstream.

It looks like they dealt with the deprecation in https://bitbucket.org/ruamel/yaml/commits/34738b9e5db18cc93684030c74ca7ef80d6d5488 if I'm reading correctly, but I don't think this test as written can work beyond 3.8.

Comment 2 Anthon van der Neut 2020-01-20 17:34:41 UTC
That piece of code only tests if collections.Hashable throws an DeprecationWarning starting with 3.7 (test is skipped below 3.7)
On 3.9 it doesn't raise a warning anymore, it has changed to an error.
Should be fixed in ruamle.yaml>=0.16.6

Comment 3 Anthon van der Neut 2020-01-20 18:51:34 UTC
ruamel.yaml 0.16.6 has been committed, uploaded to PyPI and added to the download page on bitbucket

Please **close** the issue on bitbuucket, if this indeed solves this problem.

Comment 4 Jason Montleon 2020-01-20 19:21:57 UTC
I only maintain the EPEL 8 branch, so I created a PR: https://src.fedoraproject.org/rpms/python-ruamel-yaml/pull-request/5

This was tested successfully using the mock setup:
Finish: rpmbuild python-ruamel-yaml-0.16.6-1.fc31.src.rpm
Finish: build phase for python-ruamel-yaml-0.16.6-1.fc31.src.rpm
INFO: Done(/home/jmontleo/rpmbuild/SRPMS/python-ruamel-yaml-0.16.6-1.fc31.src.rpm) Config(fedora-rawhide-python39) 1 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-python39/result

Comment 5 Jason Montleon 2020-01-20 21:33:07 UTC
The 0.16.6 update to address this is merged.


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