Skip to content

Commit bec8206

Browse files
committed
Removes warning about missing FLUXBOX executable from the settings panel, and updates deprecated API from the logging package.
fixes #55
1 parent c772f2e commit bec8206

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

matlab_proxy/app_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ async def __update_matlab_state(self) -> None:
484484
"'busy' status endpoint returned an invalid response, falling back to using 'ping' endpoint to determine MATLAB state"
485485
)
486486
warning = f"{mwi_env.get_env_name_shutdown_on_idle_timeout()} environment variable is supported only for MATLAB versions R2021a or later"
487-
logger.warn(warning)
487+
logger.warning(warning)
488488
self.warnings.append(warning)
489489

490490
else:

matlab_proxy/settings.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ def get(config_name=matlab_proxy.get_default_config_name(), dev=False):
289289
if not settings["is_windowmanager_available"]:
290290
warning = " Unable to find fluxbox on the system PATH. To use Simulink Online, add Fluxbox to the system PATH and restart matlab-proxy. For details, see https://github.com/mathworks/matlab-proxy#requirements."
291291
logger.warning(warning)
292-
settings["warnings"].append(warning)
293292

294293
settings.update(get_matlab_settings())
295294

@@ -500,7 +499,7 @@ def _validate_ssl_files_and_get_ssl_context(mwi_config_folder):
500499
# Don't use SSL if the user has explicitly disabled SSL communication or not set the respective env var
501500
if not is_ssl_enabled:
502501
if ssl_cert_file:
503-
logger.warn(
502+
logger.warning(
504503
f"Ignoring provided SSL files, as {env_name_enable_ssl} is either unset or set to false"
505504
)
506505
return None
@@ -597,7 +596,7 @@ def generate_new_self_signed_certs(mwi_certs_dir):
597596
f.write(cert.public_bytes(serialization.Encoding.PEM))
598597

599598
except Exception as ex:
600-
logger.warn(
599+
logger.warning(
601600
f"Failed to generate self-signed certificates, proceeding with non-secure mode! Error: {ex}"
602601
)
603602
cert_file = priv_key_file = None

matlab_proxy/util/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020-2024 The MathWorks, Inc.
1+
# Copyright 2020-2025 The MathWorks, Inc.
22
import argparse
33
import inspect
44
import os
@@ -312,7 +312,7 @@ def __init__(self, purpose):
312312
self._acquired_by = None
313313
self._lock = asyncio.Lock()
314314
if not purpose:
315-
logger.warn("Provide a purpose for this instance of TrackingLock")
315+
logger.warning("Provide a purpose for this instance of TrackingLock")
316316
self._purpose = purpose
317317

318318
@property

matlab_proxy/util/mwi/token_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020-2024 The MathWorks, Inc.
1+
# Copyright 2020-2025 The MathWorks, Inc.
22

33
# This file contains functions required to enable token based authentication in the server.
44

@@ -39,7 +39,7 @@ def generate_mwi_auth_token_and_hash():
3939

4040
if enable_token_auth == "false":
4141
if auth_token:
42-
logger.warn(
42+
logger.warning(
4343
f"Ignoring {env_name_mwi_auth_token}, as {env_name_enable_mwi_token_auth} explicitly set to false"
4444
)
4545
return _format_token_as_dictionary(None)

matlab_proxy/util/mwi/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def validate_idle_timeout(timeout):
380380
return timeout
381381

382382
except ValueError:
383-
logger.warn(
383+
logger.warning(
384384
f"Invalid value supplied for {mwi_env.get_env_name_shutdown_on_idle_timeout()}: {timeout}. Continuing without any IDLE timeout."
385385
)
386386
return None

0 commit comments

Comments
 (0)