Skip to content

Commit ef4070d

Browse files
committed
Remove python2.
It is not supported on the latest Ubuntu LTS, and has been unsupported for almost 5 years.
1 parent 98ad9a2 commit ef4070d

File tree

12 files changed

+15
-105
lines changed

12 files changed

+15
-105
lines changed

cms/grading/languages/python2_cpython.py

Lines changed: 0 additions & 80 deletions
This file was deleted.

cmstestsuite/Tests.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,19 @@
4848
LANG_JAVA = "Java / JDK"
4949
LANG_PASCAL = "Pascal / fpc"
5050
LANG_PHP = "PHP"
51-
LANG_PYTHON = "Python 2 / CPython"
5251
LANG_PYTHON3 = "Python 3 / CPython"
5352
LANG_RUST = "Rust"
5453
LANG_C_SHARP = "C# / Mono"
5554
ALL_LANGUAGES = (
5655
LANG_CPP, LANG_CPP14, LANG_CPP17, LANG_C, LANG_HS, LANG_JAVA, LANG_PASCAL,
57-
LANG_PHP, LANG_PYTHON, LANG_PYTHON3, LANG_RUST, LANG_C_SHARP
56+
LANG_PHP, LANG_PYTHON3, LANG_RUST, LANG_C_SHARP
5857
)
5958
NON_INTERPRETED_LANGUAGES = (
6059
LANG_C, LANG_CPP, LANG_CPP14, LANG_CPP17, LANG_PASCAL
6160
)
6261
COMPILED_LANGUAGES = (
6362
LANG_C, LANG_CPP, LANG_CPP14, LANG_CPP17, LANG_PASCAL, LANG_JAVA,
64-
LANG_PYTHON, LANG_PYTHON3, LANG_HS, LANG_RUST, LANG_C_SHARP
63+
LANG_PYTHON3, LANG_HS, LANG_RUST, LANG_C_SHARP
6564
)
6665

6766
ALL_TESTS = [

cmstestsuite/tasks/batch_fileio_managed/code/checker

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys

cmstestsuite/tasks/communication_fifoio_stubbed/code/manager

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys
@@ -17,7 +16,7 @@ correct = True
1716

1817
# Speak the to program a few times, check what it does, and output the last
1918
# line.
20-
for i in range(10,20) + [0]:
19+
for i in list(range(10, 20)) + [0]:
2120
x = i + input_value
2221
# Write a question to the candidate executable.
2322
fifo_to_user.write("%d\n" % x)

cmstestsuite/tasks/communication_many_fifoio_stubbed/code/manager

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys
@@ -20,7 +19,7 @@ correct = True
2019

2120
# Speak the to program a few times, check what it does, and output the last
2221
# line.
23-
for i in range(10, 20) + [0]:
22+
for i in list(range(10, 20)) + [0]:
2423
x = i + input_value
2524
# Write a question to the candidate executable.
2625
fifo_to_user1.write("%d\n" % x)

cmstestsuite/tasks/communication_many_stdio_stubbed/code/manager

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys
@@ -22,7 +21,7 @@ correct = True
2221

2322
# Speak the to program a few times, check what it does, and output the last
2423
# line.
25-
for i in range(10, 20) + [0]:
24+
for i in list(range(10, 20)) + [0]:
2625
x = i + input_value
2726
# Write a question to the candidate executable.
2827
fifo_to_user1.write("%d\n" % x)

cmstestsuite/tasks/communication_stdio/code/manager

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys
@@ -19,7 +18,7 @@ correct = True
1918

2019
# Speak the to program a few times, check what it does, and output the last
2120
# line.
22-
for i in range(10,20) + [0]:
21+
for i in list(range(10, 20)) + [0]:
2322
x = i + input_value
2423
# Write a question to the candidate executable.
2524
fifo_to_user.write("%d\n" % x)

cmstestsuite/tasks/communication_stdio_stubbed/code/manager

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys
@@ -19,7 +18,7 @@ correct = True
1918

2019
# Speak the to program a few times, check what it does, and output the last
2120
# line.
22-
for i in range(10,20) + [0]:
21+
for i in list(range(10, 20)) + [0]:
2322
x = i + input_value
2423
# Write a question to the candidate executable.
2524
fifo_to_user.write("%d\n" % x)

cmstestsuite/tasks/outputonly_comparator/code/checker

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys

cmstestsuite/tasks/twosteps_comparator/code/checker

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/python2 -sS
1+
#!/usr/bin/python3 -sS
22

3-
from __future__ import print_function
43

54
import io
65
import sys

0 commit comments

Comments
 (0)