-
Notifications
You must be signed in to change notification settings - Fork 139
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
Python3 support #33
Python3 support #33
Conversation
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 working on this and sorry for the late review.
I left a few comments below. My main concern is the new six
dependency. I would prefer to avoid adding it as a dependency if the only use is detecting Python2 vs. Python3. In a lot of cases, there are solutions that are compatible with both versions (see https://python-future.org/compatible_idioms.html for some examples).
Could you also update the Travis CI's matrix to add Python3 tests?
@pchaigno |
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 a lot @mmisono! This is looking good :-)
I just have two minor comments left and I think we'll be good to merge.
.travis.yml
Outdated
include: | ||
- name: python 2.7 | ||
os: linux | ||
dist: xenial |
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.
Can we move these configurations out of the build matrix to avoid duplicating it?
.travis.yml
Outdated
- pip install --user -r requirements.txt | ||
- pip install --user cpp-coveralls | ||
- python$PYTHON -m pip install --user -r requirements.txt | ||
- python$PYTHON -m pip install --user cpp-coveralls |
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.
Maybe defining PYTHON
as python{2,3}
and then using $PYTHON -m pip ...
would be a bit cleaner?
Add python3 support to ubpf-(dis)assembler.py Also add python3 test in CI. Signed-off-by: Masanori Misono <[email protected]>
@pchaigno |
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 a lot @mmisono!
This PR adds python3 support to
ubpf-(dis)assembler.py
. nosetest gives the same result with both python2 (2.7.13) and python3 (3.6.9) on my environment (Ran 858 tests, OK (SKIP=475)).Signed-off-by: Masanori Misono [email protected]