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

Fix Python 2/3 compatibility issues #57

Merged
merged 1 commit into from
Mar 11, 2020
Merged

Conversation

jnak
Copy link
Contributor

@jnak jnak commented Mar 3, 2020

Fixes #40.

The issue was that compat.py did not handle correctly all the edge cases around urllib. In addition to aliasing sub-modules, future backports some urllib sub-modules so it can better deal with mixed encodings.

I had to refactor how the tests are setup in order to run them with and without the compatibility aliases. Due to how pytest share environments across tests, it was not possible to conditionally install the aliases on a per-test basis. Now all the tests, except for Flake8, will run in both regular and compatibility modes. This should prevent future regressions.

Let me know if you have any questions.

Copy link
Contributor

@sherwinski sherwinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jnak, thank you very much for the PR!
I appreciate the thoughtfulness you put into this both in regards to test coverage as well as documentation. I only have one small question before moving forward.

setup.py Show resolved Hide resolved
@jnak
Copy link
Contributor Author

jnak commented Mar 11, 2020

@sherwinski Thanks for reviewing!

@sherwinski sherwinski merged commit 2ba3ca6 into imgix:master Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Py2 and 3 compatibility
2 participants