Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Python 3 support #22

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

imsickofmaps
Copy link
Contributor

Currently an issue arises from requests_testadapter:

BytesIO.__init__(self, stream)
TypeError: 'str' does not support the buffer interface

We have worked around this in seed-stage-based-messaging tests by encoding it:

adapter = RecordingAdapter(json.dumps(response).encode('utf-8'))

This would also require an updated importing of url_parse:

try:
    from urllib.parse import urlparse
except ImportError:
    from urlparse import urlparse

@hodgestar
Copy link
Contributor

@gsvr Which bits of the go-http-api code does this refer to?

@gsvr
Copy link
Author

gsvr commented Apr 20, 2016

@hodgestar go_http/tests/test_metrics.py, for example https://github.com/praekelt/go-http-api/blob/develop/go_http/tests/test_metrics.py#L95

@hodgestar
Copy link
Contributor

Could you open a pull request to add Python 3 to Travis and then we can review and sort out issues there?

@imsickofmaps
Copy link
Contributor

@hodgestar done as requested

@hodgestar
Copy link
Contributor

We will also need to update the fakes module from the go-contacts-api package.

@hodgestar
Copy link
Contributor

Noting that http://python-future.org/compatible_idioms.html is a good palce to start for this work (and depending on the future module is probably sensible).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants