Bug 1217524 - python-bugzilla doesn't handle gzip replies
Summary: python-bugzilla doesn't handle gzip replies
Keywords:
Status: CLOSED DUPLICATE of bug 1215439
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bugzilla
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-30 14:55 UTC by Radek Novacek
Modified: 2016-12-01 00:34 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-04-30 15:58:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Radek Novacek 2015-04-30 14:55:15 UTC
Description of problem:
I've updated to fedora 22 recently and python(3)-bugzilla stopped working. It seems that due to some change lower in the stack (python?) python-bugzilla now tries to accept gzip encoded replies but doesn't handle them at all.

Version-Release number of selected component (if applicable):
python-bugzilla-1.2.0-1.fc22.noarch
python3-bugzilla-1.2.0-1.fc22.noarch

How reproducible:
Run this script using both python and python3:

from bugzilla import RHBugzilla4
bz = RHBugzilla4(url="https://bugzilla.redhat.com/xmlrpc.cgi")


Actual results:
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 237, in _request_helper
    return self.parse_response(response)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 210, in parse_response
    parser.feed(response.text.encode('utf-8'))
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 445, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/test.py", line 3, in <module>
    bz = RHBugzilla4(url="https://bugzilla.redhat.com/xmlrpc.cgi")
  File "/usr/lib/python3.4/site-packages/bugzilla/rhbugzilla.py", line 55, in __init__
    _parent.__init__(self, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 448, in __init__
    self.connect(url)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 601, in connect
    self.login()
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 645, in login
    ret = self._login(self.user, self.password)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 613, in _login
    return self._proxy.User.login({'login': user, 'password': password})
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 1089, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 168, in _ServerProxy__request
    ret = ServerProxy._ServerProxy__request(self, methodname, params)
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 1419, in __request
    verbose=self.__verbose
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 263, in request
    return self._request_helper(url, request_body)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 250, in _request_helper
    raise e
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 237, in _request_helper
    return self.parse_response(response)
  File "/usr/lib/python3.4/site-packages/bugzilla/base.py", line 210, in parse_response
    parser.feed(response.text.encode('utf-8'))
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 445, in feed
    self._parser.Parse(data, 0)
bugzilla.base.BugzillaError: not well-formed (invalid token): line 1, column 0


Expected results:
Nothing, it should just work.

Additional info:
When a debugger is attached, I can see binary response getting from bugzilla.

Comment 1 Cole Robinson 2015-04-30 15:58:23 UTC
python-urllib3 regression, grab the latest from updates testing

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


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