Bug 1793518 - python-cssselect2 fails to build with Python 3.9: Element.getiterator() is gone
Summary: python-cssselect2 fails to build with Python 3.9: Element.getiterator() is gone
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cssselect2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Schwarz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-21 13:57 UTC by Miro Hrončok
Modified: 2020-03-17 09:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-17 08:38:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Kozea cssselect2 issues 12 0 None closed python-cssselect2 fails to build with Python 3.9.0a2. 2020-03-16 13:09:17 UTC

Description Miro Hrončok 2020-01-21 13:57:25 UTC
python-cssselect2 fails to build with Python 3.9.0a2.

_____________ ERROR collecting cssselect2/tests/test_cssselect2.py _____________
cssselect2/tests/test_cssselect2.py:48: in <module>
    TEST_DOCUMENT = get_test_document()
cssselect2/tests/test_cssselect2.py:31: in get_test_document
    parent = next(e for e in document.getiterator() if e.get('id') == 'root')
E   AttributeError: 'ElementTree' object has no attribute 'getiterator'

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

"Methods getchildren() and getiterator() in the ElementTree module have been removed. They were deprecated in Python 3.2. Use functions list() and iter() instead. The xml.etree.cElementTree module has been removed." 



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

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

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 Felix Schwarz 2020-01-21 14:08:30 UTC
Thank you for running the tests. I created an upstream issue to notify and will monitor the situation.

Comment 2 Felix Schwarz 2020-01-26 13:37:23 UTC
Problem was fixed upstream (https://github.com/Kozea/cssselect2/pull/13). I'll close this issue once we have an actual release of cssselect2.

Comment 3 Ben Cotton 2020-02-11 17:25:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 4 Miro Hrončok 2020-03-16 13:33:01 UTC
> I'll close this issue once we have an actual release of cssselect2.

Do you know the upstream plans for that? Is it worth to backport the fix or wait?

Comment 5 Felix Schwarz 2020-03-16 13:52:37 UTC
The fix seems to be trivial so I could carry a patch. I just asked in the upstream tracker if a new release is imminent.

Comment 6 Felix Schwarz 2020-03-17 08:38:14 UTC
upstream released 0.3.0 yesterday following my inquiry. New version is already built in rawhide so I assume the new version should be ready for Python 3.9.

Comment 7 Petr Viktorin (pviktori) 2020-03-17 09:15:56 UTC
Indeed, it built fine with Python 3.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/build/1309490/
Thank you!


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