Skip to content

Commit 827192b

Browse files
committed
[OMCSessionZMQ] remove depreciated function execute()
1 parent 59af333 commit 827192b

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

OMPython/OMCSession.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import time
5252
from typing import Any, Optional, Tuple
5353
import uuid
54-
import warnings
5554
import zmq
5655

5756
import psutil
@@ -676,12 +675,6 @@ def run_model_executable(cmd_run_data: OMCSessionRunData) -> int:
676675

677676
return returncode
678677

679-
def execute(self, command: str):
680-
warnings.warn("This function is depreciated and will be removed in future versions; "
681-
"please use sendExpression() instead", DeprecationWarning, stacklevel=2)
682-
683-
return self.sendExpression(command, parsed=False)
684-
685678
def sendExpression(self, command: str, parsed: bool = True) -> Any:
686679
"""
687680
Send an expression to the OMC server and return the result.

tests/test_ZMQ.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ def test_Simulate(om, model_time_str):
3636
assert om.sendExpression('res.resultFile')
3737

3838

39-
def test_execute(om):
40-
with pytest.deprecated_call():
41-
assert om.execute('"HelloWorld!"') == '"HelloWorld!"\n'
39+
def test_sendExpression(om):
4240
assert om.sendExpression('"HelloWorld!"', parsed=False) == '"HelloWorld!"\n'
4341
assert om.sendExpression('"HelloWorld!"', parsed=True) == 'HelloWorld!'
4442

0 commit comments

Comments
 (0)