After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628731 - doesn't work with python 2.7
doesn't work with python 2.7
Status: RESOLVED FIXED
Product: git-bz
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: git-bz-maint
git-bz-maint
Depends on:
Blocks:
 
 
Reported: 2010-09-03 19:28 UTC by Matthias Clasen
Modified: 2010-09-22 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix python-2.7 compatibility with xmlrpclib (2.71 KB, patch)
2010-09-22 16:00 UTC, Owen Taylor
committed Details | Review

Description Matthias Clasen 2010-09-03 19:28:56 UTC
Trying to edit or push, I get the following on F14 with python 2.7:

Traceback (most recent call last):
  • File "/usr/libexec/git-core/git-bz", line 2031 in <module>
    do_edit(*args)
  • File "/usr/libexec/git-core/git-bz", line 1778 in do_edit
    edit_bug(bug)
  • File "/usr/libexec/git-core/git-bz", line 1573 in edit_bug
    legal_resolutions = bug.server.legal_values('resolution')
  • File "/usr/libexec/git-core/git-bz", line 874 in legal_values
    values = self._legal_values(field)
  • File "/usr/libexec/git-core/git-bz", line 856 in _legal_values
    response = self.get_xmlrpc_proxy().Bug.legal_values({ 'field': field })
  • File "/usr/lib64/python2.7/xmlrpclib.py", line 1224 in __call__
    return self.__send(self.__name, args)
  • File "/usr/lib64/python2.7/xmlrpclib.py", line 1570 in __request
    verbose=self.__verbose
  • File "/usr/lib64/python2.7/xmlrpclib.py", line 1264 in request
    return self.single_request(host, handler, request_body, verbose)
  • File "/usr/lib64/python2.7/xmlrpclib.py", line 1294 in single_request
    response = h.getresponse(buffering=True)
AttributeError: HTTPS instance has no attribute 'getresponse'

Comment 1 Owen Taylor 2010-09-22 16:00:11 UTC
Created attachment 170842 [details] [review]
Fix python-2.7 compatibility with xmlrpclib

In Python 2.7 xmlrpclib was changed to use httplib.HTTP[S]Connection
instead of the deprecatede httplib.HTTP[S]. This broke our
xmlrpclib.Transport subclass which overrode make_connection().
For compatibility with old and new Python, switch to subclassing
Transport and SafeTransport separately, with a mixin to add cookies.
Comment 2 Owen Taylor 2010-09-22 16:00:26 UTC
Attachment 170842 [details] pushed as 8c82336 - Fix python-2.7 compatibility with xmlrpclib