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
Added Python 3 compatibility #10
Conversation
Default encoding by HTML supplier is UTF-8, and we never set it to anything else.
The container is modified during iteration, so ensure we're working on a copy on both python 2 and 3.
Failed previously for such statements as `python -m rested.app`.
Thanks for doing this @vidartf ! Will try to take a look in the next few days... |
@@ -43,4 +43,6 @@ def main(): | |||
|
|||
|
|||
if __name__ == '__main__': | |||
if __package__ is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. Wasn't aware of that pep.
Quick usability test on Python2.7 and Python 3.5 was successful. |
LGTM. Thanks! |
Will merge today if no more comments come in. |
Added Python 3 compatibility
This should make the codebase compatible with Python 3. There might still be some string encoding issues left (always hard to track down), but as far as I can see this works as it should.