Skip to content

Commit d7b5bca

Browse files
committed
[OMCSessionZMQ] remove depreciated function execute()
1 parent f16a61f commit d7b5bca

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
@@ -50,7 +50,6 @@
5050
import time
5151
from typing import Any, Optional
5252
import uuid
53-
import warnings
5453
import zmq
5554

5655
# TODO: replace this with the new parser
@@ -536,12 +535,6 @@ def _connect_to_omc(self, timeout) -> str:
536535

537536
return port
538537

539-
def execute(self, command):
540-
warnings.warn("This function is depreciated and will be removed in future versions; "
541-
"please use sendExpression() instead", DeprecationWarning, stacklevel=1)
542-
543-
return self.sendExpression(command, parsed=False)
544-
545538
def sendExpression(self, command, parsed=True):
546539
p = self._omc_process.poll() # check if process is running
547540
if p is not None:

tests/test_ZMQ.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ 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!'

0 commit comments

Comments
 (0)