-
Notifications
You must be signed in to change notification settings - Fork 598
make python code compatible with both python2 and python3 #3412
Conversation
There are a few syntax errors to fix |
It seems some syntax error only reported undert python2's syntax checker.
But with python3's syntax checker, those errors are gone.
|
Seems like cpplint is not compatible? Maybe try to upgrade it https://github.com/apache/incubator-heron/tree/master/third_party/python/cpplint |
The original |
import logging | ||
import os | ||
import signal | ||
import urlparse | ||
from urllib.parse import parse_qsl |
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.
Looks like this is a package only valid in py3?
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.
it's available in python2 with the first two lines of this file
from future.standard_library import install_aliases
install_aliases()
* make code compatible with both python2 and 3
* make code compatible with both python2 and 3
Given the deadline for python3 migration is drawing near, we need to move all python related code to python3 now.
This PR uses the 2to3 tools to update all the python files.