On Wed, May 20, 2020 at 06:01:27PM +0100, Calum Mackay wrote: > On 20/05/2020 5:46 pm, Bruce Fields wrote: > > Fix comments and version checks that refer to python 2 > > The minimum required version may actually be greater than 3.0, I'm not > > sure. > > for what it's worth, it requires at least v3.2, since it uses > os.fsencode(), which was introduced in that rev. > > That doesn't contradict your statement, of course, and I've not > checked the rest of it. Thanks! I've updated it to refer to 3.2. --b. commit f7234d07ee81 Author: J. Bruce Fields <bfields@xxxxxxxxxx> Date: Tue May 19 22:58:23 2020 -0400 Fix comments and version checks that refer to python 2 The minimum required version may actually be greater than 3.2, I'm not sure. I've been testing with 3.8.2. Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py index cc509965f8e7..6a13e856f3f0 100644 --- a/nfs4.0/lib/rpc/rpc.py +++ b/nfs4.0/lib/rpc/rpc.py @@ -1,6 +1,6 @@ # rpc.py - based on RFC 1831 # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/nfs4client.py b/nfs4.0/nfs4client.py index 5916dcc74139..f67c1e3695d6 100755 --- a/nfs4.0/nfs4client.py +++ b/nfs4.0/nfs4client.py @@ -9,8 +9,8 @@ # import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os # Allow to be run stright from package root diff --git a/nfs4.0/nfs4lib.py b/nfs4.0/nfs4lib.py index 9adeb81daa95..a9a65d7a2f10 100644 --- a/nfs4.0/nfs4lib.py +++ b/nfs4.0/nfs4lib.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4lib.py - NFS4 library for Python # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py index e7ef2b052833..fcaa0ebec075 100644 --- a/nfs4.0/servertests/environment.py +++ b/nfs4.0/servertests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.0/testserver.py b/nfs4.0/testserver.py index 4f31f92a1e34..f28ba1bdb6d0 100755 --- a/nfs4.0/testserver.py +++ b/nfs4.0/testserver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for @@ -26,8 +26,8 @@ import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os # Allow to be run stright from package root diff --git a/nfs4.1/client41tests/environment.py b/nfs4.1/client41tests/environment.py index 25e7cb08ebb1..f84399b4a533 100644 --- a/nfs4.1/client41tests/environment.py +++ b/nfs4.1/client41tests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py index e7bcaa90904c..ef4db762ff08 100644 --- a/nfs4.1/server41tests/environment.py +++ b/nfs4.1/server41tests/environment.py @@ -1,7 +1,7 @@ # # environment.py # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/testclient.py b/nfs4.1/testclient.py index 19bd148edde2..46b7abc1e0a5 100755 --- a/nfs4.1/testclient.py +++ b/nfs4.1/testclient.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for @@ -23,8 +23,8 @@ import use_local # HACK so don't have to rebuild constantly import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index 8c4ccdef5afa..6285758fe74d 100644 --- a/nfs4.1/testmod.py +++ b/nfs4.1/testmod.py @@ -1,6 +1,6 @@ # testmod.py - run tests from a suite # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for diff --git a/nfs4.1/testserver.py b/nfs4.1/testserver.py index f3fcfe9b8851..0447ccd5da7c 100755 --- a/nfs4.1/testserver.py +++ b/nfs4.1/testserver.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # nfs4stest.py - nfsv4 server tester # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for @@ -27,8 +27,8 @@ import use_local # HACK so don't have to rebuild constantly import sys -if sys.hexversion < 0x02070000: - print("Requires python 2.7 or higher") +if sys.hexversion < 0x03020000: + print("Requires python 3.2 or higher") sys.exit(1) import os diff --git a/showresults.py b/showresults.py index 0229a1e4d7b6..a39e1b9f7689 100755 --- a/showresults.py +++ b/showresults.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # showresults.py - redisplay results from nfsv4 server tester output file # -# Requires python 2.7 +# Requires python 3.2 # # Written by Fred Isaman <iisaman@xxxxxxxxxxxxxx> # Copyright (C) 2004 University of Michigan, Center for