Skip to content

Commit afb4816

Browse files
committed
24.1.2
1 parent 36b4cb5 commit afb4816

5 files changed

Lines changed: 17 additions & 23 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
2121
MATLAB Engine API for Python can be installed directly from the Python Package Index.
2222
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
2323
```bash
24-
$ python -m pip install matlabengine==24.1.1
24+
$ python -m pip install matlabengine==24.1.2
2525
```
2626

2727

@@ -46,7 +46,7 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:<matlabroot>/bin/glnxa64
4646
MATLAB Engine API for Python can be installed directly from the Python Package Index.
4747
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
4848
```bash
49-
$ python -m pip install matlabengine==24.1.1
49+
$ python -m pip install matlabengine==24.1.2
5050
```
5151

5252
### macOS
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:<matlabroot>/bin/maci64
7070
MATLAB Engine API for Python can be installed directly from the Python Package Index.
7171
<!-- MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string) -->
7272
```bash
73-
$ python -m pip install matlabengine==24.1.1
73+
$ python -m pip install matlabengine==24.1.2
7474
```
7575

7676
---

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class _MatlabFinder(build_py):
2424
MATLAB_REL = 'R2024a'
2525

2626
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
27-
MATLAB_VER = '24.1.1'
27+
MATLAB_VER = '24.1.2'
2828

2929
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
3030
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
@@ -416,7 +416,7 @@ def run(self):
416416
setup(
417417
name="matlabengine",
418418
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
419-
version="24.1.1",
419+
version="24.1.2",
420420
description='A module to call MATLAB from Python',
421421
author='MathWorks',
422422
license="LICENSE.txt, located in this repository",

src/matlab/engine/__init__.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Copyright 2014-2022 MathWorks, Inc.
1+
#Copyright 2014-2023 MathWorks, Inc.
22

33
"""
44
The MATLAB Engine enables you to call any MATLAB statement either synchronously
@@ -44,7 +44,10 @@
4444
firstExceptionMessage = ''
4545
secondExceptionMessage = ''
4646
try:
47-
pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
47+
if _PYTHONVERSION != '3_9' and _PYTHONVERSION != '3_10':
48+
pythonengine = importlib.import_module("matlabengineforpython_abi3")
49+
else:
50+
pythonengine = importlib.import_module("matlabengineforpython" + _PYTHONVERSION)
4851
except Exception as firstE:
4952
firstExceptionMessage = str(firstE)
5053

@@ -65,7 +68,10 @@
6568
else:
6669
os.environ[_envs[_arch]] = _bin_dir
6770
os.add_dll_directory(_bin_dir)
68-
pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
71+
if _PYTHONVERSION != '3_9' or _PYTHONVERSION != '3_10':
72+
pythonengine = importlib.import_module("matlabengineforpython_abi3")
73+
else:
74+
pythonengine = importlib.import_module("matlabengineforpython" + _PYTHONVERSION)
6975
except Exception as secondE:
7076
str1 = 'Please reinstall MATLAB Engine for Python or contact '
7177
str2 = 'MathWorks Technical Support for assistance:\nFirst issue: {}\nSecond issue: {}'.format(
@@ -106,9 +112,8 @@ def start_matlab(option="-nodesktop", **kwargs):
106112
107113
Parameters
108114
option - MATLAB startup option.
109-
async, background: bool - start MATLAB asynchronously or not. This parameter
110-
is optional and false by default. "async" is a synonym for "background"
111-
that will be removed in a future release.
115+
background: bool - start MATLAB asynchronously or not. This parameter
116+
is optional and false by default.
112117
113118
Returns
114119
MatlabEngine - if aync or background is false. This object can be used to evaluate

src/matlab/engine/fevalfuture.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
import time
2020
import weakref
2121

22-
try:
23-
long
24-
except NameError:
25-
long = int
26-
27-
2822
class FevalFuture(BaseFuture):
2923
"""
3024
A FevalFuture object is used to hold the future result of a MATLAB

src/matlab/engine/futureresult.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
from matlab.engine import MatlabFuture
1717
from matlab.engine import FevalFuture
1818

19-
try:
20-
long
21-
except NameError:
22-
long = int
23-
2419
class FutureResult():
2520
"""
2621
A FutureResult object is used to hold the future result of a function call.
@@ -58,7 +53,7 @@ def result(self, timeout=None):
5853
RejectedExecutionError - an error occurs if the engine is terminated.
5954
"""
6055
if timeout is not None:
61-
if not isinstance(timeout, (int, long, float)):
56+
if not isinstance(timeout, (int, float)):
6257
raise TypeError(pythonengine.getMessage('TimeoutMustBeNumeric', type(timeout).__name__))
6358

6459
if timeout < 0:

0 commit comments

Comments
 (0)