Bug 1251583 - TypeError: __init__() got an unexpected keyword argument 'server_hostname'
TypeError: __init__() got an unexpected keyword argument 'server_hostname'
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-gevent (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: John Keck
atomic-bugs@redhat.com
: Extras
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-07 15:37 EDT by Robert Kuska
Modified: 2017-08-02 02:54 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Kuska 2015-08-07 15:37:02 EDT
Backport of PEP466[0] into Python-2.7.5 causes errors in python-gevent package.
Discussion about PEP466 causing problems for gevent can be seen at [1]. (Note that _ssl.sslwrap function was backported along with PEP466 into RHEL7.2 and it shouldn't cause any problems).

How to reproduce:
Enable tests at build time and rebuild the package.
======================================================================
ERROR: test_fileno (__main__.OtherNetworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_urllib2net.py", line 170, in test_fileno
    res = opener.open(req)
  File "/usr/lib64/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 469, in error
    result = self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 656, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1258, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib64/python2.7/urllib2.py", line 1211, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib64/python2.7/httplib.py", line 979, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1013, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 975, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 835, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 797, in send
    self.connect()
  File "/usr/lib64/python2.7/httplib.py", line 1198, in connect
    server_hostname=sni_hostname)
  File "/usr/lib64/python2.7/ssl.py", line 350, in wrap_socket
    _context=self)
TypeError: __init__() got an unexpected keyword argument 'server_hostname'

This seems to be caused by gevent having bundled its own ssl.py module. Note that there is much more errors  but it looks like that those were there even before the PEP466 backport.





[0] https://bugzilla.redhat.com/show_bug.cgi?id=1111461
[1] https://github.com/gevent/gevent/issues/477

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