Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed saving to html and json in Python 3 #1016

Merged
merged 4 commits into from Dec 18, 2016
Merged

Fixed saving to html and json in Python 3 #1016

merged 4 commits into from Dec 18, 2016

Conversation

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Dec 11, 2016

Fixes #979 which ended up throwing bugs in Renderer.save in python3 when a string type was written to file. By defining the MIME type the encoding is applied correctly.

Needs some tests before merging.

@philippjfr philippjfr changed the title Fixed rendering to html and json in Python 3 Fixed saving to html and json in Python 3 Dec 11, 2016
@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Dec 11, 2016

Make sure to test this change with the archive functionality. If I remember right, there is code that needs to use the mime type to figure out how to encode the data (bytes vs strings).

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Dec 11, 2016

If I remember right, there is code that needs to use the mime type to figure out how to encode the data (bytes vs strings).

That's exactly the bit that was failing before I defined these. Will definitely test that.

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Dec 18, 2016

Ready once tests pass.

@jlstevens
Copy link
Contributor

@jlstevens jlstevens commented Dec 18, 2016

Looks good. I'll merge now on the understanding that you did test this with hv.archive.

@jlstevens jlstevens merged commit bd283ec into master Dec 18, 2016
4 checks passed
4 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 76.127%
Details
@philippjfr
s3-reference-data-cache Test data is cached.
Details
@philippjfr philippjfr deleted the renderer_mime_types branch Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants