Bug 1792966

Summary: python-ofxparse fails to build with Python 3.9: imports abc from collections
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-ofxparseAssignee: Dan Callaghan <djc>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, djc, mhroncok, pviktori
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ofxparse-0.21-2.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-19 11:51:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1785415    

Description Miro Hrončok 2020-01-20 13:00:16 UTC
python-ofxparse fails to build with Python 3.9.0a2.

43 erros like this one:

ERROR: testReadTransfer (tests.test_parse.TestVanguard401kStatement)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/ofxparse-0.18/tests/test_parse.py", line 586, in testReadTransfer
    ofx = OfxParser.parse(f)
  File "/builddir/build/BUILD/ofxparse-0.18/ofxparse/ofxparse.py", line 387, in parse
    ofx_file = OfxPreprocessedFile(file_handle)
  File "/builddir/build/BUILD/ofxparse-0.18/ofxparse/ofxparse.py", line 147, in __init__
    super(OfxPreprocessedFile, self).__init__(fh)
  File "/builddir/build/BUILD/ofxparse-0.18/ofxparse/ofxparse.py", line 65, in __init__
    if not is_iterable(self.fh):
  File "/builddir/build/BUILD/ofxparse-0.18/ofxparse/ofxparse.py", line 40, in is_iterable
    return isinstance(candidate, collections.Iterable)
AttributeError: module 'collections' has no attribute 'Iterable'

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/01161753-python-ofxparse/

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

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 Ben Cotton 2020-02-11 17:32:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 2 Dan Callaghan 2020-02-15 07:20:43 UTC
This was reported and fixed upstream: https://github.com/jseutter/ofxparse/pull/156

Comment 3 Dan Callaghan 2020-02-19 11:31:49 UTC
Should be fixed by this commit:
https://src.fedoraproject.org/rpms/python-ofxparse/c/daf9912332a4fb990a8e742eebf3cccf04e13d8f?branch=master
although I didn't actually check with Python 3.9 since it seems like it hasn't landed in rawhide just yet.

Comment 4 Petr Viktorin (pviktori) 2020-02-19 11:51:53 UTC
It built successfully with Python 3.9 in COPR: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/build/1244723/

Thank you!

Comment 5 Fedora Update System 2023-08-23 04:22:24 UTC
FEDORA-2023-90ffce805e has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-90ffce805e

Comment 6 Fedora Update System 2023-08-23 04:22:32 UTC
FEDORA-2023-90ffce805e has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.