mirror of
https://github.com/apache/superset.git
synced 2026-07-27 09:02:29 +00:00
Per richardfogaca's review: the unconditional filters matched only the warning message, so they suppressed the same setuptools pkg_resources warning from any dependency, not just sqlalchemy-redshift. Scopes each filter with category=UserWarning and module=sqlalchemy_redshift(?:\..*)? across all four registration points (db_engine_specs/redshift.py, initialization/__init__.py, mcp_service/__init__.py and server.py). Adds a regression test proving SupersetAppInitializer.configure_logging() installs the filter before LOGGING_CONFIGURATOR.configure_logging() dispatches, and tightens the existing mcp_service assertion to check the new category/module scoping. The server.py registration is intentionally kept (not removed as suggested) with a comment explaining why: pytest's warnings plugin resets warnings.filters around every test, and the existing test_suppress_third_party_warnings test fails without this line if removed, proving the reset scenario is real.
23 KiB
23 KiB