py34 client fails when using no ssl compression

Bug #1442883 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Stuart McLaren
Nominated for Kilo by Erno Kuvaja

Bug Description

When using python 3.4 with https and no ssl compression is specified the client stack traces:

  File "/mnt/sam/git/python-glanceclient/.tox/py34/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "/mnt/sam/git/python-glanceclient/.tox/py34/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 349, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.4/http/client.py", line 1066, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1094, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib/python3.4/http/client.py", line 979, in putrequest
    if url.startswith('http'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

description: updated
Revision history for this message
Louis Taylor (kragniz) wrote :
Changed in python-glanceclient:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Stuart McLaren (stuart-mclaren)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/172634
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=bd0aa0672e0ebb5dfaa2178a8ffce79be143524b
Submitter: Jenkins
Branch: master

commit bd0aa0672e0ebb5dfaa2178a8ffce79be143524b
Author: Stuart McLaren <email address hidden>
Date: Sat Apr 11 10:28:20 2015 +0000

    Fix https stack trace on python 3.4 client

    When using the client with python 3.4 and no ssl compression the following
    stack trace ocurrs:

     TypeError: startswith first arg must be bytes or a tuple of bytes, not str

    Closes-bug: 1442883
    Related-bug: 1357430
    Change-Id: I8e28f0bb1f3e866f11851247ce31470ca8c2af4f

Changed in python-glanceclient:
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/174294

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (stable/kilo)

Change abandoned by Stuart McLaren (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/174294
Reason: I'm going to abandon this.

Turns out it doesn't sort all the 3.4 issues, and a better approach is just to avoid any special https handing for python 3.

I don't think this fix is critical for 0.17.1

Changed in python-glanceclient:
milestone: none → 1.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.