-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from warnings import warn | ||
|
||
warn("`argparse_utils` package has been renamed to `argparse` since v1.2 and will be removed in v1.3", | ||
warn("`argparse_utils` package has been renamed to `argparse` since v1.2 and will be removed in v1.4", | ||
DeprecationWarning) | ||
|
||
from pytorch_lightning.utilities.argparse import * # noqa: F403 E402 F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from warnings import warn | ||
|
||
warn("`model_utils` package has been renamed to `model_helpers` since v1.2 and will be removed in v1.3", | ||
warn("`model_utils` package has been renamed to `model_helpers` since v1.2 and will be removed in v1.4", | ||
DeprecationWarning) | ||
|
||
from pytorch_lightning.utilities.model_helpers import * # noqa: F403 E402 F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from warnings import warn | ||
|
||
warn("`warning_utils` package has been renamed to `warnings` since v1.2 and will be removed in v1.3", | ||
warn("`warning_utils` package has been renamed to `warnings` since v1.2 and will be removed in v1.4", | ||
DeprecationWarning) | ||
|
||
from pytorch_lightning.utilities.warnings import * # noqa: F403 E402 F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from warnings import warn | ||
|
||
warn("`xla_device_utils` package has been renamed to `xla_device` since v1.2 and will be removed in v1.3", | ||
warn("`xla_device_utils` package has been renamed to `xla_device` since v1.2 and will be removed in v1.4", | ||
DeprecationWarning) | ||
|
||
from pytorch_lightning.utilities.xla_device import * # noqa: F403 E402 F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright The PyTorch Lightning team. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Test deprecated functionality which will be removed in vX.Y.Z""" | ||
import pytest | ||
|
||
from tests.deprecated_api import _soft_unimport_module | ||
|
||
|
||
def test_v1_4_0_deprecated_imports(): | ||
_soft_unimport_module('pytorch_lightning.utilities.argparse_utils') | ||
with pytest.deprecated_call(match='will be removed in v1.4'): | ||
from pytorch_lightning.utilities.argparse_utils import from_argparse_args # noqa: F811 F401 | ||
|
||
_soft_unimport_module('pytorch_lightning.utilities.model_utils') | ||
with pytest.deprecated_call(match='will be removed in v1.4'): | ||
from pytorch_lightning.utilities.model_utils import is_overridden # noqa: F811 F401 | ||
|
||
_soft_unimport_module('pytorch_lightning.utilities.warning_utils') | ||
with pytest.deprecated_call(match='will be removed in v1.4'): | ||
from pytorch_lightning.utilities.warning_utils import WarningCache # noqa: F811 F401 | ||
|
||
_soft_unimport_module('pytorch_lightning.utilities.xla_device_utils') | ||
with pytest.deprecated_call(match='will be removed in v1.4'): | ||
from pytorch_lightning.utilities.xla_device_utils import XLADeviceUtils # noqa: F811 F401 |