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

Make Pirant compatible for multiple python versions #17

Open
aayush26 opened this issue Oct 20, 2017 · 3 comments
Open

Make Pirant compatible for multiple python versions #17

aayush26 opened this issue Oct 20, 2017 · 3 comments
Assignees
Projects

Comments

@aayush26
Copy link
Owner

Problem statement: Seems like pirant is compatible to only py2.7 currently. We should make it compatible for 3.4 and above also.
Solution suggested: @AmiraliM suggested on using SIX package
Scope of implementation: Fix existing codebase to make it compatible for all python versions.

References:
SIX package: https://pythonhosted.org/six/

@aayush26 aayush26 changed the title Make Python 2.7 and Python 3.4 compatible Make Pirant compatible for multiple python versions Oct 20, 2017
@Cogitri
Copy link
Contributor

Cogitri commented Oct 20, 2017

Sorry, but doesn't pirant already work with python >=3? At least all tests pass here with python 3.6

@aayush26
Copy link
Owner Author

@Cogitri We need to recheck once again.
@AmiraliM found out an instance were it fails.
In python 3, response.context returns bytes while in python 2.7, it returns string. Hence, json.loads() works in 2.7 but not in 3.4
Why this was not captured in tests because we only wrote Unit tests and all these external responses using request library are mocked, hence we missed it and all tests passed.

@aayush26
Copy link
Owner Author

@AmiraliM , @Cogitri mentioned about using future over six. He also provided a reference: http://python-future.org/faq.html#what-is-the-relationship-between-future-and-six
Have a look into it and lets discuss how to resolve this issue or whether its already resolved by @Cogitri commit #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
pirant
Awaiting triage
Development

No branches or pull requests

3 participants