|
|
Created:
6 years, 3 months ago by elecro Modified:
6 years, 3 months ago Reviewers:
Dirk Pranke CC:
blink-reviews Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Project:
blink Visibility:
Public. |
DescriptionRemove unused python version checker script
The ensure-valid-python script seems to be unused,
and additionally in webkitpy there is already another
version checker implementation.
BUG=none
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181918
Patch Set 1 #
Total comments: 1
Patch Set 2 : script removal #
Created: 6 years, 3 months ago
Messages
Total messages: 12 (2 generated)
pgal.u-szeged@partner.samsung.com changed reviewers: + dpranke@chromium.org
I'm not sure that we really even need this script; perhaps we should just delete it? However, if we do want to keep it, I'm not sure why you wrote it the way you did ... https://codereview.chromium.org/559993002/diff/1/Tools/Scripts/ensure-valid-p... File Tools/Scripts/ensure-valid-python (right): https://codereview.chromium.org/559993002/diff/1/Tools/Scripts/ensure-valid-p... Tools/Scripts/ensure-valid-python:23: sys.stderr = stderr() Why have this? For testing the version check? Also, why not use argparse?
On 2014/09/10 19:59:39, Dirk Pranke wrote: > I'm not sure that we really even need this script; perhaps we should just delete > it? > > However, if we do want to keep it, I'm not sure why you wrote it the way you did > ... > > https://codereview.chromium.org/559993002/diff/1/Tools/Scripts/ensure-valid-p... > File Tools/Scripts/ensure-valid-python (right): > > https://codereview.chromium.org/559993002/diff/1/Tools/Scripts/ensure-valid-p... > Tools/Scripts/ensure-valid-python:23: sys.stderr = stderr() > Why have this? For testing the version check? > > Also, why not use argparse? The reason for writing the code this was is the following: I wanted to use the minimal subset of python to be able to run the script, thus I avoided the argparse module (there won't be import error when someone uses the script). For the stderr override: I wanted to preserve the original script's mechanism, that when the correct argument is provided there will be no console printouts. webkitpy's version checker prints out the error message if the version is incorrect. Overriding the stderr will supress that message. I'm all for deleting this script, but I don't know it is used at all somehere (and I didn't want to break anything).
On 2014/09/11 07:47:59, elecro wrote: > On 2014/09/10 19:59:39, Dirk Pranke wrote: > > I'm not sure that we really even need this script; perhaps we should just > delete > > it? > > > > However, if we do want to keep it, I'm not sure why you wrote it the way you > did > > ... > > > > > https://codereview.chromium.org/559993002/diff/1/Tools/Scripts/ensure-valid-p... > > File Tools/Scripts/ensure-valid-python (right): > > > > > https://codereview.chromium.org/559993002/diff/1/Tools/Scripts/ensure-valid-p... > > Tools/Scripts/ensure-valid-python:23: sys.stderr = stderr() > > Why have this? For testing the version check? > > > > Also, why not use argparse? > > The reason for writing the code this was is the following: I wanted to use the > minimal subset of python to be able to run the script, thus I avoided the > argparse module (there won't be import error when someone uses the script). > > For the stderr override: I wanted to preserve the original script's mechanism, > that when the correct argument is provided there will be no console printouts. > webkitpy's version checker prints out the error message if the version is > incorrect. Overriding the stderr will supress that message. > Fair enough. > I'm all for deleting this script, but I don't know it is used at all somehere > (and I didn't want to break anything). I did some digging. It looks like this file was originally used to allow scripts to run on Tiger (Mac OS 10.4); if the installed pything version was too old, it would download and install a current version. When Apple dropped support for Tiger, they removed the download-and-install part of this. It looks like it was also used to help provide a bridge between old-run-webkit-tests and new- ; the wrapper script would probably have checked the python version before launching new-run-webkit-tests. We don't need any of this stuff any more, and I think the version_check is probably good enough. If you would be so kind, please delete the file instead. I'll take the blame if it breaks something :). If you'd prefer, I can post the CL to delete it, too.
On 2014/09/11 16:52:38, Dirk Pranke wrote: [snip] > If you would be so kind, please delete the file instead. I'll take the blame if > it breaks something :). If you'd prefer, I can post the CL to delete it, too. Okay, I'll update the CL with the removal of the file.
I've updated the CL, please check.
lgtm. You have a typo in your description: additionally needs another 'l' :)
On 2014/09/12 15:04:06, Dirk Pranke wrote: > lgtm. > > You have a typo in your description: additionally needs another 'l' :) ah.. thanks :)
The CQ bit was checked by pgal.u-szeged@partner.samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/559993002/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 181918 |