Core: reset log level when using pyximport (#6212)

This commit is contained in:
qwint
2026-05-20 09:12:54 +02:00
committed by GitHub
parent d0abfeb88b
commit 545171f3f4
+4
View File
@@ -527,7 +527,11 @@ else:
except ImportError:
pyximport = None
try:
import logging
logger = logging.getLogger()
old_level = logger.level
from _speedups import LocationStore
logger.setLevel(old_level)
except ImportError:
warnings.warn("_speedups not available. Falling back to pure python LocationStore. "
"Install a matching C++ compiler for your platform to compile _speedups.")