Skip to content

Commit de4c523

Browse files
committed
Change NVX disable message from RuntimeWarning to info logging
When users explicitly disable NVX via AUTOBAHN_USE_NVX=0 (a valid configuration choice), they were getting a noisy RuntimeWarning on every import. This is not a warning condition - it's informational feedback about their intentional configuration. Changed from warnings.warn(RuntimeWarning) to log.info() so users can still see the message if they configure logging to show info level, but it won't be noisy by default. Fixes #1737
1 parent 6ef556b commit de4c523

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

autobahn/websocket/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424
#
2525
###############################################################################
2626

27+
import logging
2728
import os
2829
import warnings
2930

31+
log = logging.getLogger(__name__)
32+
3033
# ============================================================================
3134
# NVX (Native Vector Extensions) Runtime Configuration
3235
# ============================================================================
@@ -107,11 +110,9 @@
107110

108111
if explicit_disable and HAS_NVX:
109112
# Case 4: NVX available but user explicitly disabled it at runtime
110-
warnings.warn(
113+
log.info(
111114
"NVX native acceleration is available but explicitly disabled via "
112-
"AUTOBAHN_USE_NVX=0. Falling back to pure Python implementations.",
113-
RuntimeWarning,
114-
stacklevel=2,
115+
"AUTOBAHN_USE_NVX=0. Falling back to pure Python implementations."
115116
)
116117
USES_NVX = False
117118
else:

0 commit comments

Comments
 (0)