Code Clean: Remove python3.8 specific code because PyTorch now need Python3.9 and later (#150834)

As the title stated.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150834
Approved by: https://github.com/Skylion007, https://github.com/albanD
This commit is contained in:
FFFrog 2025-04-08 19:49:37 +08:00 committed by PyTorch MergeBot
parent 901b02cf16
commit 17f9276e29
2 changed files with 0 additions and 16 deletions

View File

@ -3,7 +3,6 @@
import functools
import operator
import pickle
import sys
import types
from itertools import permutations
from typing import Any
@ -325,11 +324,6 @@ class TestMisc(TestCase):
# test for https://github.com/numpy/numpy/pull/16574#issuecomment-642660971
assert np.dtype(dtype=np.float64) == np.dtype(np.float64)
@skipif(sys.version_info >= (3, 9), reason="Requires python 3.9")
def test_class_getitem_38(self) -> None:
with pytest.raises(TypeError):
np.dtype[Any]
class TestFromDTypeAttribute(TestCase):
def test_simple(self):

View File

@ -5,7 +5,6 @@ Test the scalar constructors, which also do type-coercion
"""
import fractions
import functools
import sys
import types
from typing import Any
from unittest import skipIf as skipif, SkipTest
@ -222,15 +221,6 @@ class TestClassGetItem(TestCase):
assert np.number[Any]
@instantiate_parametrized_tests
class TestClassGetitemMisc(TestCase):
@skipif(sys.version_info >= (3, 9), reason="Requires python 3.8")
@parametrize("cls", [np.number, np.complexfloating, np.int64])
def test_class_getitem_38(self, cls: type[np.number]) -> None:
with pytest.raises(TypeError):
cls[Any]
@skip(reason="scalartype(...).bit_count() not implemented")
@instantiate_parametrized_tests
class TestBitCount(TestCase):