matlab-proxy 0.23.4__py3-none-any.whl → 0.24.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of matlab-proxy might be problematic. Click here for more details.
- matlab_proxy/app_state.py +31 -21
- matlab_proxy/gui/index.html +20 -1
- matlab_proxy/gui/static/css/index.BSVLACuY.css +10 -0
- matlab_proxy/gui/static/js/index.Cm14Eqsb.js +64 -0
- matlab_proxy/util/mwi/embedded_connector/helpers.py +2 -2
- matlab_proxy/util/mwi/embedded_connector/request.py +1 -1
- matlab_proxy/util/mwi/logger.py +1 -2
- {matlab_proxy-0.23.4.dist-info → matlab_proxy-0.24.1.dist-info}/METADATA +2 -2
- {matlab_proxy-0.23.4.dist-info → matlab_proxy-0.24.1.dist-info}/RECORD +38 -53
- matlab_proxy_manager/lib/api.py +21 -18
- matlab_proxy_manager/storage/server.py +26 -1
- tests/unit/conftest.py +1 -2
- tests/unit/test_app_state.py +1 -1
- tests/unit/util/mwi/test_logger.py +1 -2
- matlab_proxy/gui/asset-manifest.json +0 -44
- matlab_proxy/gui/static/css/main.efa05ff9.css +0 -13
- matlab_proxy/gui/static/css/main.efa05ff9.css.map +0 -1
- matlab_proxy/gui/static/js/main.ce0f5505.js +0 -3
- matlab_proxy/gui/static/js/main.ce0f5505.js.LICENSE.txt +0 -59
- matlab_proxy/gui/static/js/main.ce0f5505.js.map +0 -1
- matlab_proxy/gui/static/media/arrow.0c2968b90bd9a64c8c3f.svg +0 -4
- matlab_proxy/gui/static/media/feedback.6e8d50eb812cf35e0e76.svg +0 -1
- matlab_proxy/gui/static/media/gripper.9defbc5e76d0de8bb6e0.svg +0 -1
- matlab_proxy/gui/static/media/help.15e5bfab03a2b9c7148e.svg +0 -1
- matlab_proxy/gui/static/media/ico-header-contact-hover.0958c44200d781def822.svg +0 -17
- matlab_proxy/gui/static/media/ico-header-contact.ae9169c8dcae37c6e04b.svg +0 -17
- matlab_proxy/gui/static/media/restart.7987508a01e84678361a.svg +0 -1
- matlab_proxy/gui/static/media/sign-out.08356b675ec854afaa77.svg +0 -1
- matlab_proxy/gui/static/media/start.50c4596fab2049b4a3a3.svg +0 -1
- matlab_proxy/gui/static/media/stop.30c9a9ab6d625032235a.svg +0 -1
- matlab_proxy/gui/static/media/terminate.7ea1363ee0fa72344ef6.svg +0 -1
- /matlab_proxy/gui/static/media/{MATLAB-env-blur.4fc94edbc82d3184e5cb.png → MATLAB-env-blur.NupTbPv_.png} +0 -0
- /matlab_proxy/gui/static/media/{glyphicons-halflings-regular.82b1212e45a2bc35dd73.woff → glyphicons-halflings-regular.BKjkU69z.woff} +0 -0
- /matlab_proxy/gui/static/media/{glyphicons-halflings-regular.5be1347c682810f199c7.eot → glyphicons-halflings-regular.BUJKDMgK.eot} +0 -0
- /matlab_proxy/gui/static/media/{glyphicons-halflings-regular.060b2710bdbbe3dfe48b.svg → glyphicons-halflings-regular.CSehLiBc.svg} +0 -0
- /matlab_proxy/gui/static/media/{glyphicons-halflings-regular.4692b9ec53fd5972caa2.ttf → glyphicons-halflings-regular.DrwTMapi.ttf} +0 -0
- /matlab_proxy/gui/static/media/{glyphicons-halflings-regular.be810be3a3e14c682a25.woff2 → glyphicons-halflings-regular.DzqM6ju8.woff2} +0 -0
- /matlab_proxy/gui/static/media/{ico-header-account-hover.89438e91d0632893b106.svg → ico-header-account-hover.-jQHo6Wx.svg} +0 -0
- /matlab_proxy/gui/static/media/{ico-header-account.86b10d7b4a2a511f6ca9.svg → ico-header-account.CJCFoo5a.svg} +0 -0
- /matlab_proxy/gui/static/media/{ico-sprite.cbdb66c0ea4c2a7fd21c.png → ico-sprite.DXGLgzq9.png} +0 -0
- /matlab_proxy/gui/static/media/{mathworks-eps.4d20e0ee46ea74bccfc1.ttf → mathworks-eps.CGNQALa9.ttf} +0 -0
- /matlab_proxy/gui/static/media/{mathworks-eps.df1428dfa69cea896c05.svg → mathworks-eps.DrkCtQtG.svg} +0 -0
- /matlab_proxy/gui/static/media/{mathworks-eps.e5c41e8478df02cbdce1.woff → mathworks-eps.Ds7lQbql.woff} +0 -0
- /matlab_proxy/gui/static/media/{mathworks-pictograms.3fc6513a06dce552eeb1.woff → mathworks-pictograms.BdqxEfBR.woff} +0 -0
- /matlab_proxy/gui/static/media/{mathworks-pictograms.f6f087b008b5a9435f26.svg → mathworks-pictograms.CCLweoD4.svg} +0 -0
- /matlab_proxy/gui/static/media/{mathworks-pictograms.6e128c0e7fc1a11f92ee.ttf → mathworks-pictograms.DZhFdRSm.ttf} +0 -0
- /matlab_proxy/gui/static/media/{mathworks.80a3218e1ba29f0573fb.svg → mathworks.C-qsbhDy.svg} +0 -0
- /matlab_proxy/gui/static/media/{mathworks.c422935b9ae545ac2ab5.ttf → mathworks.Ceplx86V.ttf} +0 -0
- /matlab_proxy/gui/static/media/{mathworks.37a563ef6aeda1593bf6.woff → mathworks.D08X1Vp8.woff} +0 -0
- /matlab_proxy/gui/static/media/{trigger-error.3f1c4ef23ab8f3e60b0e.svg → trigger-error.QEdsGL-m.svg} +0 -0
- /matlab_proxy/gui/static/media/{trigger-ok.7b9c238be42f685c4fa7.svg → trigger-ok.Dzg8OIrk.svg} +0 -0
- {matlab_proxy-0.23.4.dist-info → matlab_proxy-0.24.1.dist-info}/LICENSE.md +0 -0
- {matlab_proxy-0.23.4.dist-info → matlab_proxy-0.24.1.dist-info}/WHEEL +0 -0
- {matlab_proxy-0.23.4.dist-info → matlab_proxy-0.24.1.dist-info}/entry_points.txt +0 -0
- {matlab_proxy-0.23.4.dist-info → matlab_proxy-0.24.1.dist-info}/top_level.txt +0 -0
matlab_proxy/app_state.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2025 The MathWorks, Inc.
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import contextlib
|
|
@@ -436,8 +436,10 @@ class AppState:
|
|
|
436
436
|
|
|
437
437
|
else:
|
|
438
438
|
await self.matlab_state_updater_lock.release()
|
|
439
|
-
await
|
|
440
|
-
|
|
439
|
+
await (
|
|
440
|
+
self._update_matlab_state_based_on_ready_file_and_connector_status(
|
|
441
|
+
matlab_endpoint_to_use
|
|
442
|
+
)
|
|
441
443
|
)
|
|
442
444
|
logger.debug(
|
|
443
445
|
f"{this_task}: Required processes are ready, Embedded Connector status is '{self.get_matlab_state()}'"
|
|
@@ -1243,7 +1245,7 @@ class AppState:
|
|
|
1243
1245
|
delay (int): time delay in seconds before retrying the file read operation
|
|
1244
1246
|
"""
|
|
1245
1247
|
logger.debug(
|
|
1246
|
-
f
|
|
1248
|
+
f"updating matlab_port information from {self.matlab_session_files['matlab_ready_file']}"
|
|
1247
1249
|
)
|
|
1248
1250
|
try:
|
|
1249
1251
|
await asyncio.wait_for(
|
|
@@ -1415,6 +1417,10 @@ class AppState:
|
|
|
1415
1417
|
waiters = []
|
|
1416
1418
|
if matlab is not None:
|
|
1417
1419
|
if system.is_posix() and matlab.returncode is None:
|
|
1420
|
+
# Close the stderr stream to prevent indefinite hanging on it due to a child
|
|
1421
|
+
# process inheriting it, fixes https://github.com/mathworks/matlab-proxy/issues/44
|
|
1422
|
+
self._close_matlab_stderr_stream(matlab)
|
|
1423
|
+
|
|
1418
1424
|
# Sending an exit request to the embedded connector takes time.
|
|
1419
1425
|
# When MATLAB is in a "starting" state (implies the Embedded connector is not up)
|
|
1420
1426
|
# OR
|
|
@@ -1427,23 +1433,9 @@ class AppState:
|
|
|
1427
1433
|
else:
|
|
1428
1434
|
logger.debug("Sending HTTP request to stop the MATLAB process...")
|
|
1429
1435
|
try:
|
|
1430
|
-
import sys
|
|
1431
|
-
|
|
1432
1436
|
# Send HTTP request
|
|
1433
1437
|
await self.__send_stop_request_to_matlab()
|
|
1434
1438
|
|
|
1435
|
-
# Close the stderr stream to prevent indefinite hanging on it due to a child
|
|
1436
|
-
# process inheriting it, fixes https://github.com/mathworks/matlab-proxy/issues/44
|
|
1437
|
-
stderr_stream = matlab._transport.get_pipe_transport(
|
|
1438
|
-
sys.stderr.fileno()
|
|
1439
|
-
)
|
|
1440
|
-
if stderr_stream:
|
|
1441
|
-
logger.debug(
|
|
1442
|
-
"Closing matlab process stderr stream: %s",
|
|
1443
|
-
stderr_stream,
|
|
1444
|
-
)
|
|
1445
|
-
stderr_stream.close()
|
|
1446
|
-
|
|
1447
1439
|
# Wait for matlab to shutdown gracefully
|
|
1448
1440
|
await matlab.wait()
|
|
1449
1441
|
|
|
@@ -1461,9 +1453,10 @@ class AppState:
|
|
|
1461
1453
|
try:
|
|
1462
1454
|
matlab.terminate()
|
|
1463
1455
|
await matlab.wait()
|
|
1464
|
-
except:
|
|
1465
|
-
|
|
1466
|
-
|
|
1456
|
+
except Exception as ex:
|
|
1457
|
+
logger.debug(
|
|
1458
|
+
"Received an exception while terminating matlab: %s", ex
|
|
1459
|
+
)
|
|
1467
1460
|
else:
|
|
1468
1461
|
# In a windows system
|
|
1469
1462
|
if system.is_windows() and matlab.is_running():
|
|
@@ -1533,6 +1526,23 @@ class AppState:
|
|
|
1533
1526
|
self.matlab_port = None
|
|
1534
1527
|
logger.debug("Completed Shutdown!!!")
|
|
1535
1528
|
|
|
1529
|
+
def _close_matlab_stderr_stream(self, matlab):
|
|
1530
|
+
"""
|
|
1531
|
+
This method attempts to close the stderr stream associated with the MATLAB process
|
|
1532
|
+
to prevent potential resource leaks. It logs a debug message if the stream is
|
|
1533
|
+
successfully closed.
|
|
1534
|
+
|
|
1535
|
+
Args:
|
|
1536
|
+
matlab: The MATLAB process reference.
|
|
1537
|
+
"""
|
|
1538
|
+
stderr_stream = matlab._transport.get_pipe_transport(sys.stderr.fileno())
|
|
1539
|
+
if stderr_stream:
|
|
1540
|
+
logger.debug(
|
|
1541
|
+
"Closing matlab process stderr stream: %s",
|
|
1542
|
+
stderr_stream,
|
|
1543
|
+
)
|
|
1544
|
+
stderr_stream.close()
|
|
1545
|
+
|
|
1536
1546
|
async def handle_matlab_output(self):
|
|
1537
1547
|
"""Parse MATLAB output from stdout and raise errors if any."""
|
|
1538
1548
|
matlab = self.processes["matlab"]
|
matlab_proxy/gui/index.html
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- Copyright 2025 The MathWorks, Inc. -->
|
|
2
|
+
|
|
3
|
+
<!doctype html>
|
|
4
|
+
<html lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta charset="UTF-8" />
|
|
7
|
+
<link rel="icon" href="./favicon.ico" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
9
|
+
<meta name="theme-color" content="#000000" />
|
|
10
|
+
<meta name="description" content="MATLAB" />
|
|
11
|
+
<meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER" />
|
|
12
|
+
<link rel="manifest" href="./manifest.json" />
|
|
13
|
+
<title>MATLAB</title>
|
|
14
|
+
<script type="module" crossorigin src="./static/js/index.Cm14Eqsb.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="./static/css/index.BSVLACuY.css">
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<div id="root"></div>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|