pyopenapi / pyswagger

An OpenAPI (fka Swagger) client & converter in python, which is type-safe, dynamic, spec-compliant.
MIT License
385 stars 89 forks source link

python 3.5 fails #74

Closed zadoev closed 8 years ago

zadoev commented 8 years ago

python3.5

test_swagger.py is code got from quick start example with some codec modifications. Becase quick start example fails with unknown xml codec error

Error: Traceback (most recent call last): File "test_swagger.py", line 61, in body=pet_Tom File "/home/cd/data/projects/python/pyswagger/pyswagger/contrib/client/requests.py", line 55, in request raw=six.StringIO(rs.content).getvalue() TypeError: initial_value must be str or None, not bytes

It's because in python3 rs.content is binary string. So it fails here.

Full output also attached. log.txt

test_swagger.py.txt

mission-liao commented 8 years ago

Thanks for your PR, it will be included in next version and released in this weekend.