Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 204278

Summary: dev-python/tlslite-0.3.8 - XMLRPCTransport doesn't work with python 2.5
Product: Gentoo Linux Reporter: Åsmund Grammeltvedt <asmundg.bugs.gentoo.org>
Component: [OLD] DevelopmentAssignee: Stefan Briesenick (RETIRED) <sbriesen>
Status: RESOLVED FIXED    
Severity: normal CC: python
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 148333    
Attachments: proposed patch

Description Åsmund Grammeltvedt 2008-01-04 14:19:12 UTC
As of python 2.5, tlslite-0.3.8's XMLRPCTransport doesn't set xmlrpclib.Transport._use_datetime and overrides the __init__ which sets this attribute. This causes a crash at least in xmlrpclib.Transport.getparser, where the attribute is used.

Reproducible: Always

Steps to Reproduce:
1.>>> from tlslite.api import XMLRPCTransport
2.>>> XMLRPCTransport().getparser()

Actual Results:  
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.5/xmlrpclib.py", line 1210, in getparser
    return getparser(use_datetime=self._use_datetime)
AttributeError: XMLRPCTransport instance has no attribute '_use_datetime'

Expected Results:  
>>> from xmlrpclib import Transport
>>> Transport().getparser()
(<xmlrpclib.ExpatParser instance at 0xdb0d40>, <xmlrpclib.Unmarshaller instance at 0xdb0cf8>)
Comment 1 Åsmund Grammeltvedt 2008-01-04 14:19:56 UTC
Created attachment 140062 [details, diff]
proposed patch
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-04 21:34:31 UTC
one question: does this patch works also for older python versions?
Comment 3 Åsmund Grammeltvedt 2008-01-05 13:55:25 UTC
It should, and I've used it with python 2.4 without any problems. _use_datetime doesn't exist in earlier versions, and I can't see any crazy introspection that could have caused problems. Setting it should have no effect in <2.5.
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-05 21:46:21 UTC
ok, then I include the patch, though I will revbump for testing.

but please send this patch also upstream. thanks!
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2008-01-05 22:01:30 UTC
ok, new revision in portage. please test!