Bug 1177024

Summary: Importing in Python3 fails due to missing ssl_match_hostname
Product: [Fedora] Fedora Reporter: Elliott Sales de Andrade <quantum.analyst>
Component: python-urllib3Assignee: Ralph Bean <rbean>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: rbean, sagarun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-23 21:03:02 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:

Description Elliott Sales de Andrade 2014-12-23 21:00:19 UTC
See this COPR build of a package on Rawhide:

https://copr-be.cloud.fedoraproject.org/results/qulogic/SciTools/fedora-rawhide-x86_64/python-pyepsg-0.2.0-3.fc20/build.log

which fails because of python3-urllib3. You can reproduce in mock as well:

$ mock -r fedora-rawhide-x86_64 --init
$ mock -r fedora-rawhide-x86_64 --install python3-urllib3
$ mock -r fedora-rawhide-x86_64 --shell
# python3 -c 'import urllib3'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.4/site-packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 29, in <module>
    from .packages.ssl_match_hostname import CertificateError
  File "/usr/lib/python3.4/site-packages/urllib3/packages/__init__.py", line 3, in <module>
    from . import ssl_match_hostname
ImportError: cannot import name 'ssl_match_hostname'

Version-Release number of selected component (if applicable):
python3-urllib3-1.10-1.fc22.noarch.rpm

Comment 1 Elliott Sales de Andrade 2014-12-23 21:03:02 UTC
Sigh, of course I just found an existing ticket after posting...

But just to add something interesting, in the Python3 section of the spec, it deletes the `ssl_match_hostname` subdirectory, but does *not* create the symlink for it (which *is* done in Python2).

*** This bug has been marked as a duplicate of bug 1176429 ***