Cleanup: remove Python version 2 checks

These were included for when Python2 was still often the default.
This commit is contained in:
Campbell Barton 2026-01-23 21:38:03 +11:00
parent 0bd5f958ea
commit dcdbd43cff
4 changed files with 1 additions and 25 deletions

View file

@ -327,8 +327,4 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
import sys main()
if sys.version_info.major < 3:
print("Incorrect Python version, use Python 3 or newer!")
else:
main()

View file

@ -9,12 +9,6 @@ __all__ = (
"main", "main",
) )
import sys
if sys.version_info.major < 3:
print("\nPython3.x needed, found %s.\nAborting!\n" %
sys.version.partition(" ")[0])
sys.exit(1)
import os import os
from os.path import ( from os.path import (
dirname, dirname,

View file

@ -11,13 +11,6 @@ __all__ = (
) )
import sys
if sys.version_info.major < 3:
print("\nPython3.x or newer needed, found %s.\nAborting!\n" %
sys.version.partition(" ")[0])
sys.exit(1)
import os import os
from os.path import join, dirname, normpath, abspath from os.path import join, dirname, normpath, abspath

View file

@ -33,13 +33,6 @@ from collections.abc import (
) )
import sys
if sys.version_info.major < 3:
print("\nPython3.x needed, found %s.\nAborting!\n" %
sys.version.partition(" ")[0])
sys.exit(1)
import subprocess import subprocess
import os import os
from os.path import ( from os.path import (