Import six.StringIO

six.StringIO
This is an fake file object for textual data. It is an alias for
StringIO.StringIO in Python 2 and io.StringIO in Python 3.

Partial Implement: blueprint py33-support

Change-Id: I76c05041565614241eea7b7595e4503c88211ee8
Fix module importing issues for Python 3

Copy py3kcompat from oslo for urlparse
Substitute StringIO / httplib with six

Partial Implement: blueprint py33-support

Change-Id: Ic8da2ca53b4217ef13f15be094437f1f4e643001
Translate print statement to print function

Use "from __future__ import print_function"
docs.python.org/3/howto/pyporting.html#from-future-import-print-function

Partial Implement: blueprint py33-support

Change-Id: I92fc07257851795a9972c8273d3278c8679d6628
Use six.iteritems() for dict

Fix the error:
AttributeError: 'dict' object has no attribute 'iteritems'

Partial Implement: blueprint py33-support

Change-Id: I5dff17d1df01d6583f882f818434804d65726c51
Import urlutils to substitute urllib

Use the openstack common urlutils.

Partial Implement: blueprint py33-support

Change-Id: I45f21d7316fe87952e841004d4c25999138a842b
replace dict.keys() with list(dict)

Partial Implement: blueprint py33-support

Change-Id: I774e5a25d25ef19ffc217910987f2c9b68d13cd3
Replace unicode() with six.u()

six.u(text)
A fake unicode literal. text should always be a normal string literal.
In Python 2, u() returns unicode, and in Python 3, a string.

Partial Implement: blueprint py33-support

Change-Id: I02849e540c1fbb1f8b02bcbfa4d9be4f60279926
replace basetring/xrange

basetring --> six.string_types
xrange --> six.moves.xrange

Partial Implement: blueprint py33-support

Change-Id: Iedc2cd66ec65c0e4685e56a3bfbf8e9d38fd0072
align the order of parameters for urlencode()

In Python 3.3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ
across Python runs.

In the test case, the fixed expecting string will not match the test
result, it is relying on the dict order.

This change transforms the input dict to a sequence of two-element list,
with fixed order, and update the related expecitng string / fixture
in test cases.

Partial Implement: blueprint py33-support

Change-Id: I6dccde9e584be8335a6375f5fbad5c5cbd7b9b6d