----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67059/#review202861 -----------------------------------------------------------
Thanks for the work of porting these over to python3 Armand! Two more high-level comments: * Why are we not using code compatible with both python2 and 3 instead of effectively forking the code? Maintaining two supposedly identical implementations requires more work and we risk of the implementations diverging as features are added to only one of them, see e.g., the autotools and cmake build setups. I don't think it is a good idea to introduce that additional amount of work for these scripts. * looking at the _Testing Done_ section, it sounds like only a part of the files have been verified, even though you want to "ported" versions for all scripts. We should not expect users to do rough verification; otherwise we risk of nobody adopting these scripts. Please do not add untested code to the repo. I would feel much more comfortable if we'd write some temporary less pretty code which can support both python2 and 3, see e.g., http://python-future.org/overview.html and the tools for automatic migration listed there (which are IMO more advanced than `2to3`). We can always tidy it up the code should we decide to drop python2 support. I am a -1 on this patch. - Benjamin Bannier On May 10, 2018, 6:24 p.m., Armand Grillet wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67059/ > ----------------------------------------------------------- > > (Updated May 10, 2018, 6:24 p.m.) > > > Review request for mesos, Andrew Schwartzmeyer, Benjamin Bannier, Eric Chung, > and Kevin Klues. > > > Repository: mesos > > > Description > ------- > > The scripts are in a temporary directory, `support/python3`. > > The scripts have been ported using `2to3`, the official tool to do so. > Many of these scripts require testing from the community before being > used by default. > > The script building the virtual environment and the git hooks have > been updated to use the new scripts. > > > Diffs > ----- > > support/build-virtualenv 850af89326721f34de20eb45a7e78fa391d031be > support/hooks/commit-msg a0c218deee3fb4b7594fe39b76c1025045ba0725 > support/hooks/post-rewrite 1ab14abf711d1923a7ae69beb33581317009a94a > support/hooks/pre-commit 6faba98ab6db68aef1a54091a08b8db1eaac8701 > support/python3/apply-reviews.py PRE-CREATION > support/python3/generate-endpoint-help.py PRE-CREATION > support/python3/jsonurl.py PRE-CREATION > support/python3/mesos-gtest-runner.py PRE-CREATION > support/python3/mesos-split.py PRE-CREATION > support/python3/mesos-style.py PRE-CREATION > support/python3/post-reviews.py PRE-CREATION > support/python3/push-commits.py PRE-CREATION > support/python3/test-upgrade.py PRE-CREATION > support/python3/verify-reviews.py PRE-CREATION > > > Diff: https://reviews.apache.org/r/67059/diff/1/ > > > Testing > ------- > > All the files are OK for our linter, I have tested `mesos-style.py` and > `post-reviews.py` (used for this review request). > > We will likely see error messages `TypeError: cannot use a string pattern on > a bytes-like object`, they are very easy to fix (we just need to add > `.decode("utf-8")` but detecting all of them requires to use the scripts. > Please do so and create issues. > > > Thanks, > > Armand Grillet > >
