diff --git a/ndsl/initialization/allocator.py b/ndsl/initialization/allocator.py index f36cd02e..6b01d449 100644 --- a/ndsl/initialization/allocator.py +++ b/ndsl/initialization/allocator.py @@ -1,6 +1,5 @@ from __future__ import annotations -import warnings from collections.abc import Callable, Sequence from typing import Any @@ -58,25 +57,6 @@ def add_data_dimensions( self.sizer.data_dimensions.update(data_dimension_descriptions) - @classmethod - def from_backend(cls, sizer: GridSizer, backend: str) -> QuantityFactory: - """Initialize a QuantityFactory to use a specific GT4Py backend. - - Note: This method is deprecated. Please change your code to use the - constructor instead. - - Args: - sizer: GridSizer object that determines the array sizes. - backend: GT4Py backend name used for performance-optimized allocation. - """ - warnings.warn( - "QuantityFactory.from_backend(sizer, backend) is deprecated. Use " - "QuantityFactory(sizer, backend=backend) instead.", - DeprecationWarning, - stacklevel=2, - ) - return cls(sizer, backend=backend) - def empty( self, dims: Sequence[str], diff --git a/tests/initialization/test_allocator.py b/tests/initialization/test_allocator.py deleted file mode 100644 index dad8d407..00000000 --- a/tests/initialization/test_allocator.py +++ /dev/null @@ -1,8 +0,0 @@ -import pytest - -from ndsl import QuantityFactory - - -def test_QuantityFactory_from_backend_warns() -> None: - with pytest.deprecated_call(): - QuantityFactory.from_backend(None, backend="numpy")