Bug 1789672

Summary: python3-openid fails to build with Python 3.9
Product: [Fedora] Fedora Reporter: Charalampos Stratakis <cstratak>
Component: python3-openidAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, mhroncok, puiterwijk
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-22 10:17:18 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 Charalampos Stratakis 2020-01-10 04:34:45 UTC
python3-openid fails to build with Python 3.9.0a2.

It seems that it's an issue with the collection.abc classes which are now not accessible through the collections module, only through the collections.abc e.g.:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-openid-3.1.0/openid/test/test_etxrd.py", line 50, in testParseOpenID
    services = self._getServices(simpleOpenIDTransformer)
  File "/builddir/build/BUILD/python3-openid-3.1.0/openid/test/test_etxrd.py", line 42, in _getServices
    return list(services.applyFilter(self.yadis_url, self.xmldoc, flt))
  File "/builddir/build/BUILD/python3-openid-3.1.0/openid/yadis/services.py", line 48, in applyFilter
    flt = mkFilter(flt)
  File "/builddir/build/BUILD/python3-openid-3.1.0/openid/yadis/filters.py", line 167, in mkFilter
    return mkCompoundFilter([parts])
  File "/builddir/build/BUILD/python3-openid-3.1.0/openid/yadis/filters.py", line 195, in mkCompoundFilter
    elif isinstance(subfilter, collections.Callable):
AttributeError: module 'collections' has no attribute 'Callable'


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

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

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, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.

Comment 1 Charalampos Stratakis 2020-01-14 17:26:53 UTC
This can be fixed with this patch:

diff --git a/openid/yadis/filters.py b/openid/yadis/filters.py
index 4a7fbc6..94461ae 100644
--- a/openid/yadis/filters.py
+++ b/openid/yadis/filters.py
@@ -12,7 +12,7 @@ __all__ = [
 ]
 
 from openid.yadis.etxrd import expandService
-import collections
+import collections.abc
 
 
 class BasicServiceEndpoint(object):
@@ -192,7 +192,7 @@ def mkCompoundFilter(parts):
                 # conversion attribute into the list of endpoint
                 # transformers
                 transformers.append(subfilter.fromBasicServiceEndpoint)
-            elif isinstance(subfilter, collections.Callable):
+            elif isinstance(subfilter, collections.abc.Callable):
                 # It's a simple callable, so add it to the list of
                 # endpoint transformers
                 transformers.append(subfilter)

Comment 2 Miro Hrončok 2020-01-22 10:06:39 UTC
I'll push https://github.com/necaris/python3-openid/pull/45 to dist git.