Skip to content

Commit c2a28db

Browse files
committed
[OMCSessionZMQ] remove depreciated function execute()
1 parent 8926af4 commit c2a28db

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
@@ -702,12 +701,6 @@ def run_model_executable(cmd_run_data: OMCSessionRunData) -> int:
702701

703702
return returncode
704703

705-
def execute(self, command: str):
706-
warnings.warn("This function is depreciated and will be removed in future versions; "
707-
"please use sendExpression() instead", DeprecationWarning, stacklevel=2)
708-
709-
return self.sendExpression(command, parsed=False)
710-
711704
def sendExpression(self, command: str, parsed: bool = True) -> Any:
712705
"""
713706
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
@@ -37,9 +37,7 @@ def test_Simulate(om, model_time_str):
3737
assert om.sendExpression('res.resultFile')
3838

3939

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

0 commit comments

Comments
 (0)