libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arfrever Frehtes Taifersar Arahesis (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LIBCLOUD-645) libcloud.test.compute.test_softlayer.SoftLayerTests.test_create_key_pair() fails with Python 3.2
Date Wed, 10 Dec 2014 17:48:12 GMT
Arfrever Frehtes Taifersar Arahesis created LIBCLOUD-645:
------------------------------------------------------------

             Summary: libcloud.test.compute.test_softlayer.SoftLayerTests.test_create_key_pair()
fails with Python 3.2
                 Key: LIBCLOUD-645
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-645
             Project: Libcloud
          Issue Type: Bug
            Reporter: Arfrever Frehtes Taifersar Arahesis


libcloud.test.compute.test_softlayer.SoftLayerTests.test_create_key_pair() fails with Python
3.2.
This problem does not occur with Python 2.* or >=3.3.
{code}
======================================================================
ERROR: test_create_key_pair (libcloud.test.compute.test_softlayer.SoftLayerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 503, in __dump
    f = self.dispatch[type(value)]
KeyError: <class 'bytes'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/libcloud/libcloud/test/compute/test_softlayer.py", line 162, in test_create_key_pair
    key_pair = self.driver.create_key_pair(name='my-key-pair')
  File "/tmp/libcloud/libcloud/compute/drivers/softlayer.py", line 452, in create_key_pair
    'SoftLayer_Security_Ssh_Key', 'createObject', new_key
  File "/tmp/libcloud/libcloud/compute/drivers/softlayer.py", line 169, in request
    endpoint})
  File "/tmp/libcloud/libcloud/common/xmlrpc.py", line 105, in request
    data = xmlrpclib.dumps(args, methodname=method_name, allow_none=True)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 937, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 495, in dumps
    dump(v, write)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 517, in __dump
    f(self, value, write)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 586, in dump_struct
    dump(v, write)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 507, in __dump
    raise TypeError("cannot marshal %s objects" % type(value))
TypeError: cannot marshal <class 'bytes'> objects

----------------------------------------------------------------------
Ran 5079 tests in 39.213s

FAILED (errors=1)
{code}

xmlrpc.client.dumps() does not support bytes in Python 3.2:
{code}
$ python3.2 -c 'import xmlrpc.client; xmlrpc.client.dumps((b"aaa",))'
Traceback (most recent call last):
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 503, in __dump
    f = self.dispatch[type(value)]
KeyError: <class 'bytes'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 937, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 495, in dumps
    dump(v, write)
  File "/usr/lib64/python3.2/xmlrpc/client.py", line 507, in __dump
    raise TypeError("cannot marshal %s objects" % type(value))
TypeError: cannot marshal <class 'bytes'> objects
$ python3.3 -c 'import xmlrpc.client; xmlrpc.client.dumps((b"aaa",))'
$
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message