[LNT] r372823 - [LNT] Python 3 support: adapt to renaming of raw_input to input
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 01:19:16 PDT 2019
Author: thopre
Date: Wed Sep 25 01:19:15 2019
New Revision: 372823
URL: http://llvm.org/viewvc/llvm-project?rev=372823&view=rev
Log:
[LNT] Python 3 support: adapt to renaming of raw_input to input
Summary:
Replace calls to raw_input by calls to input() which is not evaluated as
an expression in Python3. Import input from builtins to maintain
current behavior on Python2. This was produced by running
futurize's stage2 lib2to3.fixes.fix_raw_input.
Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls
Reviewed By: hubert.reinterpretcast
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D67818
Modified:
lnt/trunk/lnt/external/stats/stats.py
lnt/trunk/requirements.client.txt
Modified: lnt/trunk/lnt/external/stats/stats.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/external/stats/stats.py?rev=372823&r1=372822&r2=372823&view=diff
==============================================================================
--- lnt/trunk/lnt/external/stats/stats.py (original)
+++ lnt/trunk/lnt/external/stats/stats.py Wed Sep 25 01:19:15 2019
@@ -224,6 +224,7 @@ SUPPORT FUNCTIONS: writecc
from __future__ import absolute_import
from __future__ import print_function
+from builtins import input
from . import pstat # required 3rd party module
import math, string, copy # required python modules
from types import *
@@ -776,7 +777,7 @@ Returns: appropriate statistic name, val
samples = ''
while samples not in ['i','r','I','R','c','C']:
print('\nIndependent or related samples, or correlation (i,r,c): ', end=' ')
- samples = raw_input()
+ samples = input()
if samples in ['i','I','r','R']:
print('\nComparing variances ...', end=' ')
@@ -811,7 +812,7 @@ Returns: appropriate statistic name, val
corrtype = ''
while corrtype not in ['c','C','r','R','d','D']:
print('\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ', end=' ')
- corrtype = raw_input()
+ corrtype = input()
if corrtype in ['c','C']:
m,b,r,p,see = linregress(x,y)
print('\nLinear regression for continuous variables ...')
@@ -2988,7 +2989,7 @@ Returns: appropriate statistic name, val
samples = ''
while samples not in ['i','r','I','R','c','C']:
print('\nIndependent or related samples, or correlation (i,r,c): ', end=' ')
- samples = raw_input()
+ samples = input()
if samples in ['i','I','r','R']:
print('\nComparing variances ...', end=' ')
@@ -3023,7 +3024,7 @@ Returns: appropriate statistic name, val
corrtype = ''
while corrtype not in ['c','C','r','R','d','D']:
print('\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ', end=' ')
- corrtype = raw_input()
+ corrtype = input()
if corrtype in ['c','C']:
m,b,r,p,see = linregress(x,y)
print('\nLinear regression for continuous variables ...')
Modified: lnt/trunk/requirements.client.txt
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/requirements.client.txt?rev=372823&r1=372822&r2=372823&view=diff
==============================================================================
--- lnt/trunk/requirements.client.txt (original)
+++ lnt/trunk/requirements.client.txt Wed Sep 25 01:19:15 2019
@@ -17,4 +17,5 @@ typing
click==6.7
pyyaml==3.12
requests
+future
-e svn+https://llvm.org/svn/llvm-project/llvm/trunk/utils/lit/#egg=lit
More information about the llvm-commits
mailing list