mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Revert "[Code Clean] Remove support of python3.9 (#163846)"
This reverts commit bc1690c7e859dee8c47a7f0bbd3c43cc27c6fd2a. Reverted https://github.com/pytorch/pytorch/pull/163846 on behalf of https://github.com/izaitsevfb due to breaks distributed tests ([comment](https://github.com/pytorch/pytorch/pull/163846#issuecomment-3386855437))
This commit is contained in:
@ -10,6 +10,11 @@ BAD_SSL = "https://self-signed.badssl.com"
|
|||||||
|
|
||||||
print("Testing SSL certificate checking for Python:", sys.version)
|
print("Testing SSL certificate checking for Python:", sys.version)
|
||||||
|
|
||||||
|
if sys.version_info[:2] < (2, 7) or sys.version_info[:2] < (3, 4):
|
||||||
|
print("This version never checks SSL certs; skipping tests")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
EXC = OSError
|
EXC = OSError
|
||||||
|
|
||||||
print(f"Connecting to {GOOD_SSL} should work")
|
print(f"Connecting to {GOOD_SSL} should work")
|
||||||
|
@ -951,7 +951,10 @@ def test_openreg(test_module, test_directory, options):
|
|||||||
|
|
||||||
|
|
||||||
def test_distributed(test_module, test_directory, options):
|
def test_distributed(test_module, test_directory, options):
|
||||||
mpi_available = subprocess.call(["command", "-v", "mpiexec"]) == 0
|
# MPI tests are broken with Python-3.9
|
||||||
|
mpi_available = subprocess.call(
|
||||||
|
"command -v mpiexec", shell=True
|
||||||
|
) == 0 and sys.version_info < (3, 9)
|
||||||
if options.verbose and not mpi_available:
|
if options.verbose and not mpi_available:
|
||||||
print_to_stderr("MPI not available -- MPI backend tests will be skipped")
|
print_to_stderr("MPI not available -- MPI backend tests will be skipped")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user