Revert "[BE] wrap deprecated function/class with typing_extensions.deprecated (#126898)"

This reverts commit 749a132fb0a8325cbad4734a563aa459ca611991.

Reverted https://github.com/pytorch/pytorch/pull/126898 on behalf of https://github.com/fbgheith due to switching typing-extensions=4.3.0 to 4.9.0 causes internal failure ([comment](https://github.com/pytorch/pytorch/pull/126898#issuecomment-2142884456))
This commit is contained in:
PyTorch MergeBot
2024-05-31 19:47:24 +00:00
parent ea13e9a097
commit 033e733021
117 changed files with 478 additions and 700 deletions

View File

@ -901,7 +901,7 @@ exit(len(w))
m = torch.nn.Linear(1, 1)
params = dict(m.named_parameters())
x = torch.randn(3, 1)
with self.assertWarnsRegex(FutureWarning, "Please use `torch.func.functional_call`"):
with self.assertWarnsRegex(UserWarning, "Please use torch.func.functional_call"):
stateless.functional_call(m, params, x)
class TestPythonOptimizeMode(TestCase):