Bug 1176429 - ImportError: cannot import name 'ssl_match_hostname'
Summary: ImportError: cannot import name 'ssl_match_hostname'
Alias: None
Product: Fedora
Classification: Fedora
Component: python-urllib3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ralph Bean
QA Contact: Fedora Extras Quality Assurance
: 1177024 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2014-12-21 17:54 UTC by Marcin Juszkiewicz
Modified: 2015-02-18 16:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-18 16:51:03 UTC
Type: Bug

Attachments (Terms of Use)

Description Marcin Juszkiewicz 2014-12-21 17:54:31 UTC
Description of problem:

    import requests
  File "/usr/lib/python3.4/site-packages/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/usr/lib/python3.4/site-packages/requests/utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/usr/lib/python3.4/site-packages/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/usr/lib/python3.4/site-packages/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/usr/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 29, in <module>
    from .packages.ssl_match_hostname import CertificateError
  File "/usr/lib/python3.4/site-packages/requests/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):


How reproducible:


Steps to Reproduce:
1. get a code which was working week ago
2. try to use it

Actual results:

traceback as above

Expected results:

code works

Additional info:

Comment 1 Elliott Sales de Andrade 2014-12-23 21:03:02 UTC
*** Bug 1177024 has been marked as a duplicate of this bug. ***

Comment 2 Elliott Sales de Andrade 2014-12-31 08:16:43 UTC
It's pretty clear from the spec why this occurs:

rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/

mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
ln -s ../../six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py

The bundled copy is removed, but the symlink is not added. Should be simple to fix, at least. Interestingly it seems to be correct in the F21 package in testing.

Comment 3 Ralph Bean 2015-01-05 17:40:35 UTC
Thanks for the report!  Sorry for the blunder.

Comment 4 Fedora Update System 2015-01-05 18:00:02 UTC
python-urllib3-1.10-2.fc21 has been submitted as an update for Fedora 21.

Comment 5 Elliott Sales de Andrade 2015-01-06 03:59:55 UTC
Just to be clear, this bug is against Rawhide, but the update appears to be for F21?

Comment 6 Ralph Bean 2015-01-06 14:06:40 UTC
Yes.  The associated rawhide build can be found here:  http://koji.fedoraproject.org/koji/buildinfo?buildID=602124

Thanks for pointing that out.  :)

Comment 7 Fedora Update System 2015-01-26 02:36:29 UTC
python-urllib3-1.10-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

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