Partially made Gumby Python 3 compatible #415
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR, I made Gumby partially Python 3 compatible, at least for my own experiment (see here).
We still have to fix libtorrent since it does not load properly under Python 3 for some reason. Additionally, the post-experiment scripts are still executed with Python 2, due to the shebangs used there. Also, since Tribler is not fully Python 3 compatible yet, support for Python 3 is fully optional and "old" experiments written with Python 2 should still work.
To run new experiments under Python 3, make sure to pass the
--py3
flag to thebuild_virtualenv.sh
script (so it will prepare a Python 3 virtualenv for you), and that you callrun.py
with Python 3 (for example:python3 gumby/run.py gumby/experiments/market/market_experiment.conf
). These changes should be enough to run your experiment under Python 3. 🎉Validation experiment to build a Python 3 venv from scratch.
Example of a Gumby experiment executed with Python 3.
Confirmed to still work under Python 2.