Skip to content

Commit da59731

Browse files
committed
[OMCSessionZMQ] remove depreciated function execute()
1 parent 07eb621 commit da59731

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

OMPython/OMCSession.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import time
5151
from typing import Any, Optional, Tuple
5252
import uuid
53-
import warnings
5453
import zmq
5554

5655
# TODO: replace this with the new parser
@@ -556,12 +555,6 @@ def omcpath_tempdir(self, tempdir_base: Optional[OMCPath] = None) -> OMCPath:
556555

557556
return tempdir
558557

559-
def execute(self, command: str):
560-
warnings.warn("This function is depreciated and will be removed in future versions; "
561-
"please use sendExpression() instead", DeprecationWarning, stacklevel=2)
562-
563-
return self.sendExpression(command, parsed=False)
564-
565558
def sendExpression(self, command: str, parsed: bool = True) -> Any:
566559
if self.omc_zmq is None:
567560
raise OMCSessionException("No OMC running. Create a new instance of OMCSessionZMQ!")

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)