Skip to content

Commit c045cf8

Browse files
committed
[OMCSessionZMQ] remove depreciated function execute()
1 parent f9bfcf6 commit c045cf8

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
@@ -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
# TODO: replace this with the new parser
@@ -323,12 +322,6 @@ def __del__(self):
323322

324323
self.omc_zmq = None
325324

326-
def execute(self, command: str):
327-
warnings.warn("This function is depreciated and will be removed in future versions; "
328-
"please use sendExpression() instead", DeprecationWarning, stacklevel=2)
329-
330-
return self.sendExpression(command, parsed=False)
331-
332325
def sendExpression(self, command: str, parsed: bool = True) -> Any:
333326
if self.omc_zmq is None:
334327
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)