diff --git a/.github/workflows/qualify_23b.yml b/.github/workflows/qualify_24a.yml
similarity index 85%
rename from .github/workflows/qualify_23b.yml
rename to .github/workflows/qualify_24a.yml
index daa00d8..1f4d2f1 100644
--- a/.github/workflows/qualify_23b.yml
+++ b/.github/workflows/qualify_24a.yml
@@ -1,15 +1,15 @@
# Run tInstall on Ubuntu against python versions 3.11, 3.10 and 3.9
-name: Test R2023b
+name: Test R2024a
on:
push:
branches:
- - R2023b
+ - R2024a
pull_request:
branches:
- - R2023b
+ - R2024a
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@@ -32,9 +32,9 @@ jobs:
python-version: ${{ matrix.python }}
- name: Set up MATLAB
- uses: matlab-actions/setup-matlab@v1
+ uses: matlab-actions/setup-matlab@v2
with:
- release: R2023b
+ release: R2024a
- uses: actions/checkout@v3
diff --git a/README.md b/README.md
index d285a06..198cb1f 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
## Requirements
### Required MathWorks Products
-* MATLAB release R2023b
+* MATLAB release R2024a
### Required 3rd Party Products
@@ -21,7 +21,7 @@ The MATLAB® Engine API for Python® provides a package to integrate MATLA
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==23.2.3
+$ python -m pip install matlabengine==24.1.4
```
@@ -29,7 +29,7 @@ $ python -m pip install matlabengine==23.2.3
### Linux®
Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, Linux installs MATLAB at:
-```/usr/local/MATLAB/R2023b```
+```/usr/local/MATLAB/R2024a```
When MATLAB is not installed in the default location, the bin/*architecture* directory within the MATLAB root directory must be added to the environment variable LD_LIBRARY_PATH. The path can be added to the environment variable within the shell startup configuration file (for example, .bashrc for bash shell or .tcshrc for tcsh).
@@ -46,14 +46,14 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/bin/glnxa64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==23.2.3
+$ python -m pip install matlabengine==24.1.4
```
### macOS
Prior to installation, check the default install location of MATLAB by calling ```matlabroot``` in a MATLAB Command Window. By default, macOS installs MATLAB at:
-```/Applications/MATLAB_R2023b.app```
+```/Applications/MATLAB_R2024a.app```
When MATLAB is not installed in the default location, the bin/*architecture* directory within the MATLAB root directory must be added to the environment variable DYLD_LIBRARY_PATH. The path can be added to the environment variable within the shell startup configuration file (for example, .bashrc for bash shell or .tcshrc for tcsh).
@@ -70,7 +70,7 @@ setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:/bin/maci64
MATLAB Engine API for Python can be installed directly from the Python Package Index.
```bash
-$ python -m pip install matlabengine==23.2.3
+$ python -m pip install matlabengine==24.1.4
```
---
diff --git a/setup.py b/setup.py
index a585e21..a4df27c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Mathworks, Inc.
+# Copyright 2024 Mathworks, Inc.
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py
@@ -21,10 +21,10 @@ class _MatlabFinder(build_py):
}
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_REL = 'R2023b'
+ MATLAB_REL = 'R2024a'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- MATLAB_VER = '23.2.3'
+ MATLAB_VER = '24.1.4'
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
SUPPORTED_PYTHON_VERSIONS = set(['3.9', '3.10', '3.11'])
@@ -37,7 +37,8 @@ class _MatlabFinder(build_py):
"9.12": "R2022a",
"9.13": "R2022b",
"9.14": "R2023a",
- "23.2": "R2023b"
+ "23.2": "R2023b",
+ "24.1": "R2024a"
}
DEFAULT_INSTALLS = {
@@ -415,7 +416,7 @@ def run(self):
setup(
name="matlabengine",
# MUST_BE_UPDATED_EACH_RELEASE (Search repo for this string)
- version="23.2.3",
+ version="24.1.4",
description='A module to call MATLAB from Python',
author='MathWorks',
license="LICENSE.txt, located in this repository",
diff --git a/src/matlab/engine/__init__.py b/src/matlab/engine/__init__.py
index c3c9710..244205e 100644
--- a/src/matlab/engine/__init__.py
+++ b/src/matlab/engine/__init__.py
@@ -1,4 +1,4 @@
-#Copyright 2014-2022 MathWorks, Inc.
+#Copyright 2014-2023 MathWorks, Inc.
"""
The MATLAB Engine enables you to call any MATLAB statement either synchronously
@@ -44,7 +44,10 @@
firstExceptionMessage = ''
secondExceptionMessage = ''
try:
- pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
+ if _PYTHONVERSION != '3_9' and _PYTHONVERSION != '3_10':
+ pythonengine = importlib.import_module("matlabengineforpython_abi3")
+ else:
+ pythonengine = importlib.import_module("matlabengineforpython" + _PYTHONVERSION)
except Exception as firstE:
firstExceptionMessage = str(firstE)
@@ -65,7 +68,10 @@
else:
os.environ[_envs[_arch]] = _bin_dir
os.add_dll_directory(_bin_dir)
- pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)
+ if _PYTHONVERSION != '3_9' or _PYTHONVERSION != '3_10':
+ pythonengine = importlib.import_module("matlabengineforpython_abi3")
+ else:
+ pythonengine = importlib.import_module("matlabengineforpython" + _PYTHONVERSION)
except Exception as secondE:
str1 = 'Please reinstall MATLAB Engine for Python or contact '
str2 = 'MathWorks Technical Support for assistance:\nFirst issue: {}\nSecond issue: {}'.format(
@@ -106,9 +112,8 @@ def start_matlab(option="-nodesktop", **kwargs):
Parameters
option - MATLAB startup option.
- async, background: bool - start MATLAB asynchronously or not. This parameter
- is optional and false by default. "async" is a synonym for "background"
- that will be removed in a future release.
+ background: bool - start MATLAB asynchronously or not. This parameter
+ is optional and false by default.
Returns
MatlabEngine - if aync or background is false. This object can be used to evaluate
diff --git a/src/matlab/engine/fevalfuture.py b/src/matlab/engine/fevalfuture.py
index ede123a..33a4501 100644
--- a/src/matlab/engine/fevalfuture.py
+++ b/src/matlab/engine/fevalfuture.py
@@ -19,12 +19,6 @@
import time
import weakref
-try:
- long
-except NameError:
- long = int
-
-
class FevalFuture(BaseFuture):
"""
A FevalFuture object is used to hold the future result of a MATLAB
diff --git a/src/matlab/engine/futureresult.py b/src/matlab/engine/futureresult.py
index 3bcdf9d..591d4b1 100644
--- a/src/matlab/engine/futureresult.py
+++ b/src/matlab/engine/futureresult.py
@@ -16,11 +16,6 @@
from matlab.engine import MatlabFuture
from matlab.engine import FevalFuture
-try:
- long
-except NameError:
- long = int
-
class FutureResult():
"""
A FutureResult object is used to hold the future result of a function call.
@@ -58,7 +53,7 @@ def result(self, timeout=None):
RejectedExecutionError - an error occurs if the engine is terminated.
"""
if timeout is not None:
- if not isinstance(timeout, (int, long, float)):
+ if not isinstance(timeout, (int, float)):
raise TypeError(pythonengine.getMessage('TimeoutMustBeNumeric', type(timeout).__name__))
if timeout < 0: