Skip to content

Commit ef7f729

Browse files
committed
Use warnings.warn(DeprecationWarning) as type_extensions is not in the DPF shipped Python
1 parent 5b02a6b commit ef7f729

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ansys/dpf/core/inputs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import warnings
2727
import weakref
2828

29-
from typing_extensions import deprecated
30-
3129
from ansys.dpf import core
3230
from ansys.dpf.core.mapping_types import map_types_to_python
3331
from ansys.dpf.core.outputs import Output, _Outputs
@@ -218,7 +216,6 @@ def __str__(self):
218216
docstr += "{:<5}{:<4}{:<20}\n".format(*line)
219217
return docstr
220218

221-
@deprecated("Use explicit output-to-input connections.")
222219
def connect(self, inpt):
223220
"""Connect any input (an entity or an operator output) to any input pin of this operator.
224221
@@ -234,6 +231,10 @@ def connect(self, inpt):
234231
Input of the operator.
235232
236233
"""
234+
warnings.warn(
235+
message="Use explicit output-to-input connections.", category=DeprecationWarning
236+
)
237+
237238
from pathlib import Path
238239

239240
corresponding_pins = []

0 commit comments

Comments
 (0)